hi,
I'm stuck when creating json for publishing data that will be used by Document Generator to create pdf reports. below is a dummy query and the result I get, and also the result I want to get I'm sure there is a small mistake somewhere, but I can't find it thanks for the suggestion!
this is query:
SELECT JSON_ARRAY (
JSON_OBJECT(
'name' VALUE 'import'
, 'desc' VALUE 'description, this brown fox...'
, 'details' VALUE
JSON_OBJECT( 'color' VALUE 'start' , 'shape' VALUE 'square' )
)
,
JSON_OBJECT(
'name' VALUE 'import'
, 'desc' VALUE 'description, this brown fox...'
, 'details' VALUE
JSON_OBJECT( 'color' VALUE 'start' , 'shape' VALUE 'square' )
)
)activity
FROM DUAL;
result that I get:
(instead of json array and strings, I get all data in one string)
{
"activity":"[{\"name\":\"import\",\"desc\":\"description, this brown fox...\",\"details\":{\"color\":\"start\",\"sha[e\":\"square\"}},{\"name\":\"import\",\"desc\":\"description, this brown fox...\",\"details\":{\"color\":\"start\",\"sha[e\":\"square\"}}]"
}
and, this is what I need:
{ "activity":[
{
"name":"import",
"desc":"description, this brown fox...",
"details":{
"color":"start",
"shape":"square"
}
},
{
"name":"import",
"desc":"description, this brown fox...",
"details":{
"color":"start",
"shape":"square"
}
}
]
}
thnx !!!