Open jeremy-tafi opened 5 years ago
That's not valid JSON, keys and sting values must be surrounded by double quotes: https://www.json.org/
That's true, but in programming languages, especially when trying to encapsulate JSON or other strings, single quotes and double quotes are used interchangeably. It would be nice for the library to support it.
On Fri, Mar 29, 2019 at 8:58 AM Nic Pottier notifications@github.com wrote:
That's not valid JSON, keys and sting values must be surrounded by double quotes: https://www.json.org/
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/buger/jsonparser/issues/160#issuecomment-477988413, or mute the thread https://github.com/notifications/unsubscribe-auth/Asufth3QkamKlqb5IGdkcQXwG7GWiDXMks5vbg4KgaJpZM4cRjHY .
-- Jeremy Reed | Software Engineer | tafi.io http://www.tafi.io/
That's true, but in programming languages, especially when trying to encapsulate JSON or other strings, single quotes and double quotes are used interchangeably. It would be nice for the library to support it. …
Well, that’s just not a good practice.
This example fails to find the key "value" because it is surrounded by single quotes instead of double quotes. Even though "technically", they should be double quotes, it'd be nice if the parser handled single quotes interchangeably.