jvican/dijon

Allow single quotes

noel-yap opened this issue · 2 comments

The following should be valid:

val query = json"""
{
'name': 'name'
}
"""

but currently throws an exception indicating that it's invalid JSON.

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/

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.