1916Re: Non-unique keys in JSON objects
- Sep 5, 2012--- In firstname.lastname@example.org, Jonathan Wallace <ninja9578@...> wrote:
> Libjson will parse them all, if you attempt to get the object by its key and said key is not unique, it will give you the first one. The only way to get the second would be to use an integrator and check the keys one by one. I've had a few requests to throw exceptions in the case of multiple objects with the same key, but it would break the standard.You can do as you like, but I think it would be better if you throw the exception.
- << Previous post in topic Next post in topic >>