Questions tagged [pljson]

PL/JSON is a generic JSON object written in PL/SQL.

PL/JSON is a generic JSON object written in PL/SQL. Using PL/SQL object syntax, users instantiate a JSON object and then add members, arrays and additional JSON objects. This object type can store JSON data, in Oracle, persistently.

The project's home page is https://github.com/pljson/pljson.

Questions using this tag should be directly related to the usage of the PL/JSON library. Other PL/SQL questions should use the tag.

Potential bugs in the PL/JSON library should not be posted as questions to StackOverflow. Such posts should be directed at the project's bug tracker -- https://github.com/pljson/pljson/issues.

44 questions
3
votes
0 answers

Oracle PL/JSON to_clob() Fails

The code below is take directly from example file ex11.sql that comes with PL/JSON. All I added was the loop code for making the string larger because I wanted to test a true clob. It fails with certain lengths and I can't figure out why. 32,763…
gfrobenius
  • 3,987
  • 8
  • 34
  • 66
2
votes
2 answers

How to parse JSON array data in Oracle APEX

I have following JSON output.I need to parse the data in to a table .Please help me the code. { "type": "Campaign", "currentStatus": "Active", "id": "206", "createdAt": "1488438112", "createdBy": "370", "depth": "complete", "folderId":…
Arjun
  • 23
  • 1
  • 4
2
votes
3 answers

How to use PL/JSON to parse array data

I am just starting to use PL/JSON and I am able to parse non-array data, such as first name, for example: json_ext.get_string (json (l_list.get (i)), 'firstName'); However I can't figure out how to parse array data such as addresses, for…
user6146386
  • 21
  • 1
  • 2
2
votes
1 answer

How to convert JSON object to varchar2 using PL/JSON

I need to convert json object to varchar using PL/JSON library. For an example, declare mapData json; text varchar2(20) begin json := 'json object'; text := convert_to_varchar(json); end;
Janitha Madushan
  • 1,453
  • 3
  • 28
  • 40
2
votes
0 answers

Does PL/JSON software support UTF-8 characters

I'm using PL/JSON to parse data from MongoDB to Oracle DB. The Packages work fine with latin characters. However, whenver there is json_value with chinese characters, the resulted value in oracle is totally corrupted (question marks, symbole ...…
Hawk
  • 5,060
  • 12
  • 49
  • 74
2
votes
2 answers

Store big JSON files into Oracle DB

I'm using the following script in order to read data from MongoDB as JSON files. DECLARE l_param_list VARCHAR2(512); l_http_request UTL_HTTP.req; l_http_response UTL_HTTP.resp; l_response_text CLOB; --l_response_text …
Hawk
  • 5,060
  • 12
  • 49
  • 74
1
vote
1 answer

How to get PLJSON working with other users

I just installed the latest version of PLJSON version 2.5.4 I successfully installed the packages on oracle with no error under the sys user, but other users can't access PLJSON for example running the test examples sql files. ran as sys/sysdba SQL>…
iStealth
  • 43
  • 4
1
vote
3 answers

Optional parameter in where condition - How to increase performance - PL/SQL

I have a stored procedure that takes optional parameters from a Json structure. If the json values is provided, the parameters will be used as a conditions for the cursors. If json value is not provided I don't want that condition. I have solved…
MrM
  • 389
  • 1
  • 8
  • 23
1
vote
1 answer

moving from PL/JSON to JSON_VALUE

We've upgraded our database to Oracle 12 and I'd like to move from PL/JSON to The in built JSON parsing tool. Has anyone done this and have you been successful? The issue I'm currently have is that json_value will only accept 4000 characters max -…
kev670
  • 810
  • 2
  • 18
  • 37
1
vote
1 answer

Oracle 12c does not recognize JSON type

I am working on parsing JSON CLOB in oracle. I am trying to retrieve and parse individual JSON elements. Main issue I isolated is that compiler is unable recognize the JSON type here. However, I am able to insert and access individual JSON elements…
Abhi
  • 1,153
  • 1
  • 23
  • 38
1
vote
1 answer

PL/JSON get json inside a json object

I need to get a json object inside a joson object using PL/JSON. For an example, json_obj1 json := json('{"ProcessParameters":{"foo":"bar","bar":"baz"}}'); I need to get 'ProcessParameters' object to another object. like, json_obj2 json :=…
Janitha Madushan
  • 1,453
  • 3
  • 28
  • 40
1
vote
1 answer

PL/JSON get both the value and the parameter in json list

I need to get both the value and the parameter in a json list using pl/json library. For an example, {TABLE:"TEST",Parameters:[{"PID":"bar"},{"PFOJ":"baz"},{"PCLI":"bar"}]} I need to get the parameter and the corresponding value in the 'Prameters'…
Janitha Madushan
  • 1,453
  • 3
  • 28
  • 40
1
vote
0 answers

UTL_HTTP GET response does not return all requested data using PL/SQL

I'm using PL/JSON library to parse data from MongoDB to Oracle DB. I use UTL_HTTP package as follows: l_http_request := UTL_HTTP.begin_request('https://api.appery.io/rest/1/db/collections/Outlets' , 'GET' …
Hawk
  • 5,060
  • 12
  • 49
  • 74
0
votes
2 answers

SQL statement returning value even though where clause is not satisfied - JSON_OBJECTAGG

When I run the below SQL query in Oracle db, the value is returning even though where clause is failing, how to avoid this issue? SELECT '{"load_invoice":' || JSON_OBJECTAGG(KEY 'Module' VALUE 'AR') || '}' FROM dual WHERE 1 = 2;
Damo
  • 31
  • 7
0
votes
0 answers

Oracle PL/SQL HTTP request response strange characters

I am using the Fedex API for rating and when I try to get the response of the json I get very strange characters in the response for exmaple. ¿ m¿QO¿0¿¿> :¿ ¿¿¿¿P¿@¿¿E]¿}w¿¿o¿¿¿~w¿¿¿I¿+¿\q2'3¿¿¿y¿S6¿¿¿uz, Co¿¿¿¿&+N.…
Justin
  • 5
  • 2
1
2 3