josdejong/jsoneditor

Option to show quotes around strings

Open

#1516 aperta il 13 mag 2023

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (2034 fork)batch import
featurehelp wanted

Metriche repository

Star
 (10.781 star)
Metriche merge PR
 (Merge medio 15h 36m) (3 PR mergiate in 30 g)

Descrizione

The API we work with returns a JSON with a bunch of fields. Sometimes it deals with numbers that may be sent as a string, especially where the number of digits (and any leading zeroes) are important to be preserved.

For example, there are cases where an ID needs to be 5 characters so a 4-digit ID is sent as "01234". But the UI makes it hard to know whats a string and what's a number because neither are quoted.

{
  "num_id": 1234,
  "str_id": "01234",
}

is rendered as

It would be nice if there was an option to show quotes for string values in the tree UI.

Guida contributor