Expand JSON string

0
Hi, When I export data as JSON with the export mapping, the string is one long string. Now we need to deliver the string as a formated string like what the format button does in the JSON structure. Is there a way to do this? Regards, Peter
asked
1 answers
2

Hi Peter,

I have done something similar for SOAP responses (XML) using a Java action. You should be able to work out the same for JSON (for example see https://stackoverflow.com/questions/4105795/pretty-print-json-in-java)

In addition, if your purpose is to display the JSON within a Mendix app you could also try the JSON Viewer/Editor widget: https://appstore.home.mendix.com/link/app/105713/

 

Cheers,

answered