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
I was testing the library with random data. As far as I understand, similarly to JSON, YAML is capable of serializing and deserializing primitives (string, number, boolean). This doesn't always seem to be the case. Please see example below:
importYAMLfrom'yamljs'describe('YAML',()=>{it('should be equal to the input',()=>{conststr='0xn5t'expect(YAML.parse(YAML.stringify(str))).toBe(str)})})
Which results in :
Expected: "0xn5t"
Received: 5
Is this something that's expected or is this a bug?
The text was updated successfully, but these errors were encountered:
bali182
changed the title
Primitive serialization issue ()
Primitive serialization issue
Apr 15, 2022
I was testing the library with random data. As far as I understand, similarly to JSON, YAML is capable of serializing and deserializing primitives (string, number, boolean). This doesn't always seem to be the case. Please see example below:
Which results in :
Is this something that's expected or is this a bug?
The text was updated successfully, but these errors were encountered: