We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not sure if this works as intended but n and y string keys resolve to bool
For example:
package main import ( "fmt" "github.com/go-yaml/yaml" ) func main() { b := []byte(`keys: - alg: RSA256 kid: somersakid kty: RSA use: sig n: AQAB e: AQAB - alg: ES256 kid: someeckid kty: EC use: sig crv: P-256 x: AQAB y: AQAB `) m := make(map[string]interface{}) if err := yaml.Unmarshal(b, m); err != nil { panic(err.Error()) } fmt.Printf("%v\n", m) }
Results with map[keys:[map[use:sig false:AQAB e:AQAB alg:RSA256 kid:somersakid kty:RSA] map[kid:someeckid kty:EC use:sig crv:P-256 x:AQAB true:AQAB alg:ES256]]]
map[keys:[map[use:sig false:AQAB e:AQAB alg:RSA256 kid:somersakid kty:RSA] map[kid:someeckid kty:EC use:sig crv:P-256 x:AQAB true:AQAB alg:ES256]]]
Not a major issue as I can just wrap n and y in quotes, but it does seem weird.
The text was updated successfully, but these errors were encountered:
Having this as well. A setting for the default type for keys would be useful.
Sorry, something went wrong.
I have also just discovered this on our codebase while converting some OpenAPI 3 specs.
This seems a duplicate of #214, the YAML spec 1.2 actually solves it.
No branches or pull requests
Not sure if this works as intended but n and y string keys resolve to bool
For example:
Results with
map[keys:[map[use:sig false:AQAB e:AQAB alg:RSA256 kid:somersakid kty:RSA] map[kid:someeckid kty:EC use:sig crv:P-256 x:AQAB true:AQAB alg:ES256]]]
Not a major issue as I can just wrap n and y in quotes, but it does seem weird.
The text was updated successfully, but these errors were encountered: