Skip to main content
added 155 characters in body
Source Link
User1974
  • 1.5k
  • 25
  • 54

In Oracle 21c, it looks like we can return a resultset as JSON text:

SELECT json_object(*)
from dual;

result:
{"DUMMY":"X"}

 

That works in db<>fiddle:

enter image description here


 

Question:

Is there a way to return the JSON text using pretty formatting?

{
   "DUMMY":"X"
}

Related: Select JSON text of SDO_GEOMETRY using SQL

In Oracle 21c, it looks like we can return a resultset as JSON text:

SELECT json_object(*)
from dual;

result:
{"DUMMY":"X"}

 

That works in db<>fiddle:

enter image description here


 

Question:

Is there a way to return the JSON text using pretty formatting?

{
   "DUMMY":"X"
}

In Oracle 21c, it looks like we can return a resultset as JSON text:

SELECT json_object(*)
from dual;

result:
{"DUMMY":"X"}

That works in db<>fiddle:

enter image description here

Question:

Is there a way to return the JSON text using pretty formatting?

{
   "DUMMY":"X"
}

Related: Select JSON text of SDO_GEOMETRY using SQL

deleted 10 characters in body
Source Link
User1974
  • 1.5k
  • 25
  • 54

In Oracle 21c, it looks like we can return a resultset as JSON text:

SELECT json_object(*)
from dual;

result:
{"DUMMY":"X"}

That works in db<>fiddledb<>fiddle:

enter image description here

db<>fiddle


Question:

Is there a way to return the JSON text using pretty formatting?

{
   "DUMMY":"X"
}

In Oracle 21c, it looks like we can return a resultset as JSON text:

SELECT json_object(*)
from dual;

result:
{"DUMMY":"X"}

That works in db<>fiddle:

enter image description here

db<>fiddle


Question:

Is there a way to return the JSON text using pretty formatting?

{
   "DUMMY":"X"
}

In Oracle 21c, it looks like we can return a resultset as JSON text:

SELECT json_object(*)
from dual;

result:
{"DUMMY":"X"}

That works in db<>fiddle:

enter image description here


Question:

Is there a way to return the JSON text using pretty formatting?

{
   "DUMMY":"X"
}
edited tags
Link
Paul White
  • 90.3k
  • 30
  • 424
  • 663
deleted 2 characters in body; edited title
Source Link
User1974
  • 1.5k
  • 25
  • 54
Loading
Became Hot Network Question
edited title
Source Link
User1974
  • 1.5k
  • 25
  • 54
Loading
Source Link
User1974
  • 1.5k
  • 25
  • 54
Loading