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
0
votes
2 answers

Example for SQL_TO_JSON

How to use the function JSON_UTIL_PKG.SQL_TO_JSON? Please give an example. I tried this: select JSON_UTIL_PKG.SQL_TO_JSON('select column from table where rownum = 1',100) from dual; but the result is not ok
NicoDP
  • 11
  • 3
0
votes
1 answer

Oracle Reading a JSON_LIST of JSON_LIST using PLJSON

I'm trying to read a JSON object with has nested lists. Which looks like this: [{ "id": 70070037001, "text": "List 1", "isleaf": 0, "children": [ { "oid": 100, "text": "Innerlistobject100", …
Sniipe
  • 115
  • 1
  • 8
0
votes
1 answer

PL/JSON Message Lists

I working on parsing a json string stored in a table CLOB in oracle 11g. This process is part of a long parsing routine that parses the data and stores the values in another table and I've just noticed that part of my data is not getting out. The…
ScottM
  • 43
  • 1
  • 8
0
votes
1 answer

Query a PL/JSON Oracle object and use it with Hibernate

Two questions about PL/JSON: It is possible to create some index and query using JSON structure? Something like: select * from t1 where json_v = json('{"field_x": 23}'); I use Hibernate as ORM. How can I use json objects with Hibernate?
lodopidolo
  • 175
  • 2
  • 10
0
votes
1 answer

pljson does 11g installation require specific actions

I want to use pljson in 11g and I notice some comments in the install.sql file around 11g. Do I need to do any specific actions to enable 11g specific features?
Damian
  • 2,709
  • 2
  • 29
  • 40
0
votes
1 answer

Using PL/JSON in oracle forms 11g

I'm trying to use PL/JSON in a Oracle 11g form. When I run the following code (taken from the example file ex1.sql of PL/JSON) directly on the database it works fine. declare obj json; begin obj := json('{"a": true }'); obj.print; --more…
MoJoE3131
  • 5
  • 1
  • 5
0
votes
1 answer

Get json with pljson & plsql

I'm trying to chop out some lists from the following json using pljson my_json := json('{"Order": {"no": 1, "batch": 2,"id": 3,"quantity": 10, "sm_pack": [ { "no": 10, "id": 1010, "quantity": 2 …
elwis
  • 1,395
  • 2
  • 20
  • 34
0
votes
2 answers

How to parse a json tree using plsql pljson framework?

I am using a webservice http://maps.google.com/maps/api/geocode/json?address=mysore to get location data in my plsql code. I am able to access the first level data using help from work with json in oracle. But this provides help to get first level…
sneha v
  • 1
  • 2
0
votes
1 answer

How to parse this JSON where name has ','

I run next example declare obj json := json('{"TR,A" : "OK" }'); begin dbms_output.put_line(JSON_EXT.GET_STRING (obj, 'TR,A')); end; and receive a message ORA-20110: JSON Path parse error: expected . or [ found , at position 4 ORA-06512:…
Dimassik
  • 3
  • 1
0
votes
1 answer

Check if JSON object is null or empty in PL/JSON

I have a script that has two loops, each doing some appending to a JSON object. Both loops append a json object to a json list. I finally have the formatting figured out, but it is also returning empty json objects. Is there a way in PL/JSON to…
Brian Robbins
  • 290
  • 3
  • 17
0
votes
1 answer

Need to parse a JSON request in pl/sql

I have recently installed the PL/JSON package and need a bit of help using it. I am getting a request (POST) and I need to parse it out to compare against my data. the request will come formatted like this: { "value1": "ABC123", "list1": [ …
Brian Robbins
  • 290
  • 3
  • 17
0
votes
1 answer

cannot get correct syntax for pljson

I've installed pljson 1.05 in Oracle Xe 11g and written a PLSQL function to extract values from the return from Amazon AWS describe-instances. Trying to obtain the values for top level items such as reservation ID work but i am unable to get values…
Trevor North
  • 2,286
  • 1
  • 16
  • 19
0
votes
1 answer

How do I use PL/JSON's to_clob method?

I have a procedure like the following: procedure receive_json(in_json in json) is my_clob clob; begin -- This line keeps returning "wong number or types: to_clob" in_json.to_clob(in_json, my_clob); -- rest of my procedure end…
James Sumners
  • 14,485
  • 10
  • 59
  • 77
0
votes
1 answer

How do I create a new JSON object with PL/JSON?

Let's say I want to create the following JSON structure in PL/JSON: { "foo": "bar", "baz": 42, "foobar": [ 1, 2, 3 ] } How do I do it?
James Sumners
  • 14,485
  • 10
  • 59
  • 77
1 2
3