News for hackers. Stuff that matters.
Re:Why is JSON so popular? Developers want out of the syntax... by viraptor on Friday March 19, 2010 @05:45PM (#1205367)
> XML needs to cope with invalid nesting, end tag names not matching start tag names etc.

I think you read a different spec ;) http://www.w3.org/TR/REC-xml/#sec-logical-struct :

    Well-formedness constraint: Element Type Match

    The Name in an element's end-tag MUST match the element type in the start-tag.
XML parser rejects the document as soon as this occurs. No different than with `{]` in JSON.

Changing " into " allows you to go to the next " without worrying about the contents before. The next " is the ending quote. Then you can resolve all the internals lazily... saving on processing time compared to JSON. For example "\"\\\"" will go through many branches and conditions. ""\"" is a simple jump over to the next " character.

There are no comments on this comment yet.