Skip to Content
Jul 18, 2019 at 06:48 PM

abap table to json with proper line breaks and indents written to output


Is there a way to write out json format with proper line breaks and indentations? I have a request to to send this in a file. I am able to generate the json from abap but when writing it out its one long string with no breaks or indents. I have seen in a demo program that it can be "displayed" in this manner but am unable to figure out how to do this without using display from cl_demo_output.

Any feedback or ideas is much appreciated!