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
The names within an object SHOULD be unique.
...
An object whose names are all unique is interoperable in the sense that all software implementations receiving that object will agree on the name-value mappings. When the names within an object are not unique, the behavior of software that receives such an object is unpredictable. Many implementations report the last name/value pair only. Other implementations report an error or fail to parse the object, and some implementations report all of the name/value pairs, including duplicates.
Because glTF 2.0 usage goes beyond Web, it would be reasonable to require uniqueness of names.
Thanks. As a side note, since it is not really possible to disallow people to attempt to use duplicate keys, it may be more accurate to say that this leads to undefined behaviour.
Because glTF 2.0 usage goes beyond Web, it would be reasonable to require uniqueness of names.
OK with me.
As a side note, since it is not really possible to disallow people to attempt to use duplicate keys, it may be more accurate to say that this leads to undefined behaviour.
As pointed out by @andreasplesch in #845:
tl;dr: 1.0 spec is silent on this. For glTF 2.0, duplicate keys aren't allowed.
According to ECMA-262 definition of
JSON.parse
(5.1, 6.0, 7.0):But RFC 7159, Section 4 gives a bit different perspective:
Because glTF 2.0 usage goes beyond Web, it would be reasonable to require uniqueness of names.
CC @pjcozzi
The text was updated successfully, but these errors were encountered: