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 content of a mapping node is an unordered set of key/value node pairs, with the restriction that each of the keys is unique.
这个规则是绝对的,YAML 1.2 解析器在遇到重复的键时必须报错。
但是注意到RFC 8259是这么说的
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.
但是注意到RFC 8259是这么说的
也就是说YAML 1.2选择直接报错也是一种合法的unpredictable的JSON实现,未违反RFC 8259解析JSON的要求。
The text was updated successfully, but these errors were encountered: