Skip to content

JSON viewer should add double-quotes around properties that need it. #166

Open
@evert

Description

@evert

We're basically using JSON5 syntax, and while this is legal:

{
  foo: "bar"
}

If the key contains (for example) a space we should encode like this:

{
  "foo 1 2": "bar"
}

So we should add quotes if the key name would be illegal with the quotes. This also includes empty keys, e.g:

{
  "": "hello world, yes this is legal
}

Real world example:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions