Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a feature in JsonParser to verify that no duplicate field values are given #60

Closed
cowtowncoder opened this issue Feb 16, 2013 · 2 comments
Milestone

Comments

@cowtowncoder
Copy link
Member

Although JSON specification does not make duplicate Object values strictly illegal (behavior is undefined I think), their existence is problematic, as behavior is not specified.
On the other hand, checking for duplicates adds non-trivial amount of cost which for valid content is pure overhead.

So it would probably make sense to add a feature to let users request that duplicate detection is enabled, and reported as an exception. For bonus points it should be possible to dynamically enable this via ObjectMapper (from databind) as well, since this will allow per-request handling (as opposed to JsonParser feature which may be more difficult to set).

@cowtowncoder
Copy link
Member Author

Started working on this, should make it in 2.3.0.

@cowtowncoder
Copy link
Member Author

Implemented; along with #106.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant