| PL/JSON |
Return the number values in the object.
Determine if a given value exists within the object.
Retrieve the value of a given key.
Retrieve a value based on its position in the internal storage array.
Retrieve the value as a boolean
.
Retrieve the value as a binary_double
.
Retrieve all of the keys within the object as a pljson_list
.
myjson := pljson('{"foo": "bar"}'); myjson.get_keys(); // ['foo']
Retrieve the value as a string 'null'
.
Retrieve the value as a number
.
Retrieve the value as a string (varchar2
).
Retrieve the value as a string represented by a CLOB
.
Retrieve the name of the type represented by the pljson_value
.
Possible return values:
object
array
string
number
bool
null
Retrieve all of the values within the object as a pljson_list
.
myjson := pljson('{"foo": "bar"}'); myjson.get_values(); // ['bar']
Print a JSON representation of the object via HTP.PRN
.
Determine the position of a given value within the internal storage array.
Determine if the value represents an "array" type.
Determine if the value represents a "boolean" type.
Determine if the value represents a "null" type.
Determine if the value represents a "number" type.
Determine if the value represents an "object" type.
Determine if the value represents a "string" type.
Create an empty pljson_value
.
declare myval pljson_value := pljson_value.makenull(); begin myval.parse_number('42'); myval.print(); // => dbms_output.put_line('42'); end;
Return a varchar2
representation of a number
type.
Parses a string into a number.
Retrieve a value from the internal storage array based on a path string and a starting index.
Primary constructor that creates an empty object.
Internally, a pljson
"object" is an array of values.
decleare myjson pljson := pljson(); begin myjson.put('foo', 'bar'); dbms_output.put_line(myjson.get('foo')); // "bar" end;
Construct a pljson
instance from a given string of JSON.
decleare myjson pljson := pljson('{"foo": "bar"}'); begin dbms_output.put_line(myjson.get('foo')); // "bar" end;
Construct a pljson
instance from a given CLOB of JSON.
Construct a pljson
instance from a given BLOB of JSON.
Construct a pljson
instance from
a given table of key,value pairs of type varchar2.
Create a new pljson
object from a current pljson_value
.
Create a new pljson
object from a current pljson_list
.
Create an empty list.
declare myarr pljson_list := pljson_list(); begin dbms_output.put_line(myarr.count()); // => 0 end;
Create an instance from a given JSON array representation.
declare myarr pljson_list := pljson_list('[1, 2, "foo", "bar"]'); begin myarr.get(1).print(); // => dbms_output.put_line(1) myarr.get(3).print(); // => dbms_output.put_line('foo') end;
Create an instance from a given JSON array representation stored in
a CLOB
.
Create an instance from a given JSON array representation stored in
a BLOB
.
Create an instance instance from a given table of string values of type varchar2.
Create an instance instance from a given table of string values of type varchar2.
Create an instance from a given instance of pljson_value
that represents an array.
Print a JSON representation of the object via DBMS_OUTPUT
.
Add a pljson
instance into the current instance under a
given key name.
Add a varchar2
instance into the current instance under a
given key name.
Add a number
instance into the current instance under a
given key name.
Add a binary_double
instance into the current instance under a
given key name.
Add a boolean
instance into the current instance under a
given key name.
This package contains the path implementation and adds support for dates and binary lob's.
Primary parsing method.
Remove a key and value from an object.
declare myjson pljson := pljson('{"foo": "foo", "bar": "bar"}') begin myjson.remove('bar'); // => '{"foo": "foo"}' end;
Serialize the object to a JSON representation string.
Serialize the object to a JSON representation and store it in a CLOB.
Convert the object to a pljson_value
for use in other methods
of the PL/JSON API.
Internal property that indicates the JSON type represented:
object
array
string
number
bool
null
| PL/JSON |