Open
Description
I know some work was done on JSON compliance here #34 but could we consider taking a stronger position?
I would expect duplicate keys to raise but instead yojson
silently accepts them. This can lead to inconsistent rules enforcement behavior, especially when passing messages between systems with different JSON implementations.
let j = Yojson.Safe.from_string "{ \"qty\":1, \"qty\":-1 }" ;;
val j : Yojson.Safe.t = `Assoc [("qty", `Int 1); ("qty", `Int (-1))]
An exposition is here An Exploration of JSON Interoperability Vulnerabilities