JSON-Viewer icon indicating copy to clipboard operation
JSON-Viewer copied to clipboard

Single quotation mark are not supported.

Open BurgessX opened this issue 3 years ago • 1 comments

I would appreciate it if you guys support single quotation mark in JSON-Viewer.

I know that it is more formal to use double quotation mark, rather than single quotation mark. However, some module interfaces do output JSON texts which contain single quotation mark, such as the python module requests. This is an example which outputs JSON text with single quotation mark:

url = 'https://...'
response = requests.get(url)
print(response.json())

BurgessX avatar Dec 13 '21 05:12 BurgessX

https://stackoverflow.com/a/33419102/724039

The json() method doesn't actually return JSON. It returns a Python object (read: dictionary) that contains the same information as the JSON data. When you print it out, the quotes are added for the sake of readability, they are not actually in your data.

Should I care about it or not?

Not.

Luuk34 avatar Jul 21 '23 09:07 Luuk34