Allow single quotes
noel-yap opened this issue · 2 comments
noel-yap commented
The following should be valid:
val query = json"""
{
'name': 'name'
}
"""
but currently throws an exception indicating that it's invalid JSON.
pathikrit commented
The JSON spec is strict regarding this. Try it here: http://jsonlint.com/
Not all JavaScript (the single quote you specified) is valid JSON since JSON is a subset of valid javascript. More Proof: http://jsonformatter.curiousconcept.com/
pathikrit commented
On the other hand, I will reopen this issue to remind myself to support JSON5 parsing: http://json5.org/ which is a extension of JSON which supports many of the things you probably want.