I JSON.stringify a json object by
JSON.stringify
result = JSON.stringify(message, my_json, 2)
The 2 in the argument above is su
2
use style white-space: pre the tag also modifies the text format which may be undesirable.
white-space: pre