Allow failing on duplicate keys
See original GitHub issueWHY
The JSON format allows for duplicate keys in objects:
{'a': 2, 'a': 4}
but the spec says it “SHOULD” not be done.
Different parsers implement it differently. It would by nice to configure the Json parses to fail on duplicate keys
HOW
Allow a setting on Json
to fail on duplicate keys:
val json = kotlinx.serialization.json.Json {
ignoreDuplicateKeys = false (default should be true
}
``
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Reasons for "DUPLICATE KEY" errors? - Stack Overflow
It looks like your problem has arisen because you are allowing inserts on more than one node and are using auto-increment fields without ......
Read more >"Cannot insert duplicate key" error occurs when you update a ...
Fixes an issue in which "Cannot insert duplicate key" error occurs when you update a table by using a bitmap index that contains...
Read more >How to avoid a "duplicate key" error? - DBA Stack Exchange
The duplicate key error is an expected condition given your description of the calling service. Your procedure needs to expect this error, catch ......
Read more >Hidden dangers of duplicate key violations in PostgreSQL and ...
The “duplicate key violates unique constraint” error notifies the caller that a retry is needed. This seems like an intuitive approach, ...
Read more >I'm seeing a duplicate keys error, what does that mean?
When loading data, EasyCatalog will check the contents of the key field columns to determine whether they contain unique values. If they don't,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I honestly was sure that we do fail on duplicate keys and that the request was about allowing duplicate keys, thus misreading the sentence.
The request indeed is reasonable and seems like it should be on by default, though it requires a proper damage assessment.
That means that the only way to run the JVM tests is to set java 11 as default version on one’s computer, which can be pretty troublesome when it’s not.