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 happened to bump upon a case where an object source yaml payload contains 2 distinct keys which are being parsed as the same key. Effectively, the only difference in the key names is the case spelling: attrFoo Vs attrfoo (see example).
As yaml specification implies on key case sensitivity, from the user perspective all 3 objects in my example document look valid, but the parsing result is a bit surprising. Could you please give me an idea if this behaviour is expected? Thanks!
The text was updated successfully, but these errors were encountered:
Hey folks,
I happened to bump upon a case where an object source yaml payload contains 2 distinct keys which are being parsed as the same key. Effectively, the only difference in the key names is the case spelling:
attrFoo
Vsattrfoo
(see example).My struct definition:
The yaml payload is defined as:
And the test program:
The output seems a bit odd:
Here is a full gist.
On the flip side yaml.v2 behaviour is exactly what I expect: it strips unknown
attrfoo
attribute:Here is a yaml.v2 gist.
As yaml specification implies on key case sensitivity, from the user perspective all 3 objects in my example document look valid, but the parsing result is a bit surprising. Could you please give me an idea if this behaviour is expected? Thanks!
The text was updated successfully, but these errors were encountered: