datalanche/json-bignum — pull request #1 by brianr (2013-10-08 07:18:02+00:00)
Title: Add `allowDuplicateProperties` parsing option.

While discouraged, the JSON spec does allow the same property to be
present more than once in an object [1]. The built-in node.js JSON parser
allows them, but json-bignum previously did not. This option (default
false, same behavior as before) makes json-bignum behave the same way as
JSON in this respect.

For example, consider the following JSON string:

`{"hello": "world1", "hello": "world2"}`

With `allowDuplicateProperties == false`, parsing above will throw a
SyntaxError. When `true`, it will return:

`{"hello": "world2"}`

Feedback welcome; I'm a little nervous sending this without any tests.

[1] See section 2.2: "The names within an object SHOULD be unique." http://www.ietf.org/rfc/rfc4627.txt