How to convert JSON object to string?

Posted by jpatel7 on 16-Nov-2017 18:48

Hello everyone,

I am a newbie with Openedge development. have a JSON object which contains JSON arrays and JSON objects. I need to convert the wrapper object into a string. Any suggestions?

Thanks in advance.

Posted by Brian K. Maher on 17-Nov-2017 07:36

I believe that defining a variable as longchar then assigning the results of <jsonobject>:GetJsonText() will do it...
 
define variable vJsonAsString as longchar no-undo.
assign vJsonAsString = MyJsonObject:GetJsonText().
 

All Replies

Posted by Brian K. Maher on 17-Nov-2017 07:36

I believe that defining a variable as longchar then assigning the results of <jsonobject>:GetJsonText() will do it...
 
define variable vJsonAsString as longchar no-undo.
assign vJsonAsString = MyJsonObject:GetJsonText().
 

This thread is closed