JsonViewer icon indicating copy to clipboard operation
JsonViewer copied to clipboard

Addition of tabbing character for wrapping invalidates the JSON

Open ssontakke opened this issue 6 years ago • 0 comments

When I click on format, it adds some tabbing characters for wrapping are added to put the text on next line.

This makes the json invalid.

Input:

{
  "my key":"my long text, this text would be wrapped."
}

Valid: Yes

After clicking on format:

{ "my key":"my long text, this text would be wrapped." } Valid: No Error: Parse error on line 2: { "my key": "my long text, this ------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'

Check this screencast: https://www.screencast.com/t/WG2hpZQqZQ

ssontakke avatar Mar 15 '19 17:03 ssontakke