-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std.parseYaml processes "on" as a boolean #766
Comments
In theory, golang behavior is correct, as in yaml, keys may not only be strings, but any object However, as Jsonnet only allows strings as object keys, in Rust implementation I explicitly deserialize object keys as strings (thus skipping all of yaml magic), matching cjsonnet behavior (cjsonnet transforms rapidyaml output to json first, again deserializing object keys as strings), thus resulting in "on" key, instead of deserializing object key as anything (boolean in this case) and then coercing it to string (toString(true)). Golang's behavior also brings problem with numbers: The solution for all of that is to not rely on yaml implementation in specific language, instead explicitly quote all the keys that might confuse the parser. |
|
I noticed this on go-jsonnet but couldn't replicate with the C or rust version:
The text was updated successfully, but these errors were encountered: