-
Notifications
You must be signed in to change notification settings - Fork 342
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
Behaviour of json validation wrt duplicate keys #2610
Comments
Marking this as a bug, since we're not compliant to the FHIR spec. |
I think there is already a test for this in the new parser, but I'm not 100%. |
Please also add trailing commas to this! See https://chat.fhir.org/#narrow/stream/179239-tooling/topic/Simplifier.20Packages/near/398385874
|
…e-properties-while-parsing #2610 signal duplicate properties while parsing
Yay! So I guess trailing commas should get it's own issue, right? |
How to deal with json resources with duplicate keys?
The Json ECMA spec is silent about it, the RFC "recommends" unique keys, and the FHIR spec, luckily, is explicit: these are not allowed.
The fact that the JSON spec itself is not explicit is probably the reason that Json.net will not complain, the default behaviour is to let subsequent occurrences of a key overwrite the previous ones:
https://www.newtonsoft.com/json/help/html/P_Newtonsoft_Json_Linq_JsonLoadSettings_DuplicatePropertyNameHandling.htm
The text was updated successfully, but these errors were encountered: