hjson-js icon indicating copy to clipboard operation
hjson-js copied to clipboard

Option to throw error when parse encounters duplicate keys?

Open jcao219 opened this issue 6 years ago • 0 comments

> parse('{a:1}')
{ a: 1 }
> parse('{a:1,a:2}')
{ a: 2 }

I know that hjson-js is just following the spec, but it would be great to have an option, as an unnoticed duplicate key can cause hidden bugs.

Further discussion, related: https://github.com/zaach/jsonlint/issues/13

jcao219 avatar Mar 02 '18 22:03 jcao219