You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the ECMAScript spec, Section 15.12.2, at the bottom of pg. 204 'In the case where there are duplicate name Strings within an object, lexically preceding values for the same key shall be overwritten.' This behaviour is relied upon by RFC 7517, e.g. Section 5 'The member names within a JWK Set MUST be unique; JWK Set parsers MUST either reject JWK Sets with duplicate member names or use a JSON parser that returns only the lexically last duplicate member name, as specified in Section 15.12 ("The JSON Object") of ECMAScript 5.1 [ECMAScript].
However, cl-json returns both values for a duplicate key:
Per the ECMAScript spec, Section 15.12.2, at the bottom of pg. 204 'In the case where there are duplicate name Strings within an object, lexically preceding values for the same key shall be overwritten.' This behaviour is relied upon by RFC 7517, e.g. Section 5 'The member names within a JWK Set MUST be unique; JWK Set parsers MUST either reject JWK Sets with duplicate member names or use a JSON parser that returns only the lexically last duplicate member name, as specified in Section 15.12 ("The JSON Object") of ECMAScript 5.1 [ECMAScript].
However, cl-json returns both values for a duplicate key:
(json:decode-json-from-string "{\"foo\": 1, \"foo\": 2}") ((:foo . 1) (:foo . 2))
I think it'd be possible to hack something together with a customised decoder, but it's probably better to handle this by default.
The text was updated successfully, but these errors were encountered: