+1

Less restrictive JSON parsing

Tim Steenvoorden 11 years ago updated 11 years ago 2

JSON configuration files can be much more readable when parsing is done using less restrictive rules:

  • Allow single quoted strings where only ' has to be escaped as ''. (Very useful for building regular expressions.)
  • Allow commas before } or ]. (A common mistake.)
  • Accept non quoted keys. (Less typing!)
I think this would improve Sublime's configuration abilities and it will not give up on performance. JSON is much more readable then XML Property Lists but misses some "humanity" from YAML. But using YAML could have a performance impact.

I think you don't know what JSON is. what you are now suggesting is more javascripty. JSON states these rules to use ", to not allow , before an } or ] and that it needs it keys in a " so NOPE

I do know what JSON is, thank you. To make it clear: I'm suggesting to use a syntax that is *not* official JSON. That is mainly for two reasons: readability and usability.


P.S. Sublime Text supports comments, which are also not official JSON.

P.P.S. Sublime Text 3 already supports point 2, thank you Jon!