Writes the content of obj into a JSON string.
This method additionally converts all NUL characters (\u0000) to ^@ for display.
\u0000
^@
Whether to pretty-print the JSON string.