According to the following post;
Does JSON syntax allow duplicate keys in an object?
Keys with the same name in JSON are valid, but most parsers will override the value with the last value it finds. Is there anyway in a json schema to detect duplicate names and throw an error? I want all json keys to have unique names in an object.
Json-schema works with valid JSON objects, so there is nothing it can do to prevent duplicate keys.
I would suggest you to use a jsonlint as a preprocess before validating with json-schema validator. It will depend on your programming language but here you have some choices:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With