Why JSON5? (was: Hash style comments)

Kevin Reid kpreid at google.com
Fri Aug 10 12:51:18 PDT 2012

On Fri, Aug 10, 2012 at 12:00 PM, Mark S. Miller <erights at google.com> wrote:
> pros: superset of JSON, subset of ES5, includes virtually all of ES5,
> including of course JSON5, supported efficiently starting with ES5
> with no need for a custom parser, de facto standard, already some
> adoption at scale (Google Sites, Google App Script)
> cons: JS specific (rather than language neutral), not (yet) a de jure standard
> As safe midpoints between JSON and full ES5, SES has clear advantages
> over JSON5 and includes JSON5 as a subset. What advantages does JSON5
> have over SES? Is there any use case better addressed by JSON5 than by
> SES?

Loading JSON or JSON5 takes space and time linear in the input size;
SES is unbounded. Therefore SES is significantly less safe for naïve
server-side processing.

More information about the es-discuss mailing list