forked from ghodss/yaml
-
Couldn't load subscription status.
- Fork 87
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.Categorizes an issue or PR as relevant to SIG API Machinery.
Description
When unmarshalling a YAML file to a map[string]interface{}, all integer values are converted to float64 values instead, despite the fact that both YAML and Go support integer values. This is presumably due to the way the package goes from YAML to JSON before finally unmarshalling to "real" Go types, with JSON only having float numeric types.
For an example of this problem in action (and a comparison to gopkg.in/yaml.v2, which does not exhibit this issue) see https://play.golang.org/p/YfO69Z3vi-V.
This is particularly notable when Helm is unmarshalling values.yaml. For an example of that, see helm/helm#8978 (comment)
venkatamutyala, rkarp, karlkfi, ash2k, latc0 and 3 moreapi-haus and homm
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.Categorizes an issue or PR as relevant to SIG API Machinery.