-
passing a json object for content.text, the output is unformatted json, then the option to format appears because of askToFormat option being true. But i want to right away set a formatted json into the editor. I use text mode. and i pass the object as is to content.text, without JSON.stringify |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If you want to just format your JSON, you can do so with a one liner, see #3 (comment). Is that what you mean? |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the quick response! <3 Yes Though i was trying JSON.stringify(MyJsonObject, null, 2) and i was getting an invalid json text, thinking that i provided a json object when i have actually parsed it to a string already. |
Beta Was this translation helpful? Give feedback.
If you want to just format your JSON, you can do so with a one liner, see #3 (comment). Is that what you mean?