Provide option for showing the spaces after keys
Hi, when I have the following JSON content:
"x" : 10
this viewer shows it as:
"x": 10
and removes the space character after the key. Can you provide an option to keep the space? It would be helpful when copying the JSON to keep it more similar to the original.
Hi @tdauth
This plugin does not cover parsing text to a JSON object, the jsonViewer function expects a valid JSON object, not text. Which means the HTML renderer has no info about the original formatting, if any!
An option to enforce a space before colon character in the renderer would possible though, but I'm unsure this is what you're looking for.
Yes this option would be sufficient. You could also make it more generic like:
beforeColon: ' ',
afterColon: ' ',
so the user can specify the characters before and after manually.