douglascrockford / JSON-js

JSON in JavaScript
http://www.JSON.org/
8.7k stars 4.59k forks source link

Json syntax #115

Closed mgwalm closed 5 years ago

mgwalm commented 5 years ago

Im trying to understand the json systax. Your page at https://www.crockford.com/mckeeman.html says the following

json element

surely it should be json elements

douglascrockford commented 5 years ago

Surely not.

fulldecent commented 5 years ago

@mgwalm the grammar elements would allow such documents as:

true, true

And such is not (both intentionally and actually) a valid JSON.

A reference for learning more on the grammar is: https://en.wikipedia.org/wiki/Backus–Naur_form as a starting point. You will find the most help there. But that is only a start, you will need to read the actual grammar on the page you cite to be specific.

Please as questions like "Im trying to understand..." on other forums since this is not the place for that type of discussion.