-
-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When parsing a Unity YAML file, one object is defined with key-value pairs, including one with a y
in it (like in X,Y coordinates). When parsed, the key is transformed to a boolean true
.
To Reproduce
Using the Playground, parse the following YAML
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!213 &21300000
Sprite:
m_Rect:
x: 0
y: 128
width: 128
height: 128
gives the following result:
[
Pair {
key: Scalar { value: 'x', range: [Array], source: 'x', type: 'PLAIN' },
value: Scalar { value: 0, range: [Array], source: '0', type: 'PLAIN' }
},
Pair {
key: Scalar { value: true, range: [Array], source: 'y', type: 'PLAIN' },
value: Scalar { value: 128, range: [Array], source: '128', type: 'PLAIN' }
},
Pair {
key: Scalar { value: 'width', range: [Array], source: 'width', type: 'PLAIN' },
value: Scalar { value: 128, range: [Array], source: '128', type: 'PLAIN' }
},
Pair {
key: Scalar { value: 'height', range: [Array], source: 'height', type: 'PLAIN' },
value: Scalar { value: 128, range: [Array], source: '128', type: 'PLAIN' }
}
]
Expected behaviour
The key of a key-value pair, should not be transformed according to the boolean rule.
Versions (please complete the following information):
- Environment: Node 22.8.0
yaml
: 2.5.1
Additional context
I found the schema used, but I have no clues where it get used when parsing the key.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working