Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Example of parsing Json using Apex_Json Package

myluismOct 18 2017 — edited Oct 18 2017

Hi All.

I'm using Apex 5.x and Oracle Database 11.2.0.4.

I have this requirement for parsing data coming from a CLOB using the Apex Web Service API.

I haven´t that much experience using APEX_JSON and all examples i´ve seen are fairly simple. I know i will eventually get the job done, but having a little help (in the form of an example or link) will safe me precious time.

My web service uses the GET method to retrieve this sample data:

{

"Facturas":{

"Factura":[

{

"NumeroFactura":"32238699",

"NumeroOrden":"011147",

"FechaEmision":"20130925",

"Total":940700 },

{

"NumeroFactura":"32239239",

"NumeroOrden":"011147",

"FechaEmision":"20130925",

"Total":854200 },

{

"NumeroFactura":"32240337",

"NumeroOrden":"011147",

"FechaEmision":"20130925",

"Total":1163800

}

]

}

}

Which is the list of receipts for a given date. As is often the case, i need to insert this data into an Oracle table. For a given date, there may be none, one or several receipts.

I don´t know how to retrieve of loop through any given piece of data .

GET_COUNT, GET_MEMBERS, DOES_EXIST, FIND_PATHS_LIKE should be quite helpful.

Any way, advice or best practice tips are highly welcomed.

Thanks in advance!!!

This post has been answered by Pavel_p on Oct 18 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2017
Added on Oct 18 2017
2 comments
424 views