Podrías usar el PUT
método de JSON_OBJECT_T
para agregar/establecer un solo valor.
Suponiendo que actualice una sola fila (con un where
cláusula), puede usar este bloque. Si hay varias filas, use un bucle o un cursor.
DECLARE
v_pertags dmo_person.per_tags%TYPE;
v_json_obj JSON_OBJECT_T;
v_new_pertags dmo_person.per_tags%TYPE;
BEGIN
SELECT per_tags
INTO v_pertags
FROM dmo_person; --where clause
v_json_obj := TREAT(json_element_t.PARSE(v_pertags) AS json_object_t);
v_json_obj.PUT('perm_bigboss' , 1);
v_json_obj.PUT('perm_admin', 0);
v_new_pertags := v_json_obj.to_string;
UPDATE dmo_person
SET per_tags = v_new_pertags; --where clause
END;
/