Skip to content
This repository has been archived by the owner on Nov 28, 2017. It is now read-only.

Throw exception when adding duplicate key from fast to safe #22

Open
mdedetrich opened this issue Nov 5, 2015 · 1 comment
Open

Throw exception when adding duplicate key from fast to safe #22

mdedetrich opened this issue Nov 5, 2015 · 1 comment

Comments

@mdedetrich
Copy link
Contributor

If it doesn't already do so, we should throw an exception if we are adding a duplicate key when using toSafe on a fast.JObject. This may have a performance impact however, so we should have a look at this carefully.

I believe that currently, it will silently ignore the duplicate key, which isn't behaviour that we want (I have to check how the builder works in this area)

Current code is located at https://github.com/json4s/json4s-ast/blob/master/jvm/src/main/scala/org/json4s/ast/fast/JValue.scala#L87-L101

@mdedetrich
Copy link
Contributor Author

Relevant issue also at #8

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

No branches or pull requests

1 participant