Tags: yuuki0xff/yaml
Tags
Add support for json.Number. (go-yaml#414) This commit adds support for encoding json.Number as a number instead of as a string, which is the underlying type of json.Number. Care has been taken to not introduce a dependency on the encoding/json package, by using an interface that specifies the methods of json.Number instead of the datatype itself. This also means that other packages that use a similar datatype will be supported. (Like json-iterator) This is useful for tools that wish to convert JSON data into YAML data by deserializing JSON into a map[string]interface{}, and use the json.Encoder's UseNumber() method, or structs that use the json.Number datatype and also wish to support yaml.
Use underlying float precision when formatting floats (go-yaml#353) Currently, all float values are formatted using 64-bit, but that incorrectly formats float32 values like 0.01 and 0.99. See https://play.golang.org/p/jbseI1ivyMW for more context. Fixes go-yaml#352.