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!

format JSON pretty

Rob_BAug 6 2016 — edited Aug 6 2016

Is there an easy way to format JSON in an easy human readable form?

I have JSON in a clob, in a table.  When I select * from table it returns the beginning of the JSON.  I want to see it in a multi line hierarchical view.

Here is a sample of the data as I would like it displayed:

{

  "code": 200,

  "data": [

    {

      "submissionId": "3dc689bf-a799-4906-b142-d94e34bf8fe9",

      "seqenenceNumber": 0,

      "formId": 91131,

      "formName": "ana-wdi v0.3",

      "userName": "rob@sei.us.com",

      "userID": 47205,

      "versionId": 3,

      "dateString": "2016-07-22T15:16:36.096-07:00"

    },

    {

      "submissionId": "de2b9967-b871-4a5d-b06a-67fb0e657ea1",

      "seqenenceNumber": 0,

      "formId": 91131,

      "formName": "ana-wdi v0.3",

      "userName": "rob@sei.us.com",

      "userID": 47205,

      "versionId": 3,

      "dateString": "2016-07-19T18:19:57.256-07:00"

    },

    {

      "submissionId": "44815f3c-0548-4e9a-a589-ec2e932705fa",

      "seqenenceNumber": 0,

      "formId": 66654,

      "formName": "time_ticket_1",

      "userName": "rob@sei.us.com",

      "userID": 47205,

      "versionId": 1,

      "dateString": "2016-02-23T00:58:07.665Z"

    }

  ]

}

This is what a select * shows:

{  "code": 200,  "data": [    {      "submissionId": "3dc689bf-a799-4906-b142-d94e34bf8fe9",      "seqenen...

I have been searching for a couple days for a solution. I have found a few things to get data, nothing like a 'select * from table' with output pretty.

I've looked at apex_web_services, json_query, apex_json, and others.  I think this would be somewhat common for developers.  That also also walking the JSON data to test or retrieve name and values.

Thanks for any help.

Rob

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2016
Added on Aug 6 2016
1 comment
1,627 views