Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problem is not commas, but the fact the specification does not tell you MUST, in a conforming parser, handle extra commas at the end. While commas are not very useful in this case, they have some value because:

1. They help humans parse the JSON object: we are helped by structure. 2. They add redundancy of information and allow for simpler spotting of syntax errors.

What JSON really needs is to extend its syntax to allow strings that are prefixed length, without the need of a binary protocol. "foo": 6="foobar". Otherwise JSON forces you to parse byte by byte, which is extremely inefficient for large amounts of data.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: