Skip to content

yj v5.0.0

Compare
Choose a tag to compare
@sclevine sclevine released this 25 Jul 19:05

Changes

  • Conversions between all formats now preserve map order.
  • The -t flag now parses/emits TOML v1.0.0-rc.1 instead of v0.4.0.
  • The -v flag now prints the version of yj (#9).
  • YAML conversions now parse/emit floats unambiguously (#3).
  • The -n flag is now enabled by default when converting between formats that both support NaN, Inf, etc.

Notes

  • YAML now uses gopkg.in/yaml.v3 instead of gopkg.in/yaml.v2.
  • TOML now uses github.com/pelletier/go-toml instead of github.com/BurntSushi/toml.
  • For most formats, preserving map order required manually parsing the AST of the various data format libraries. This change improved other formatting issues, such as the ambiguity of floats in YAML. However, it also increased the complexity of yj significantly -- please report bugs!

Installation

Available for macOS via Homebrew:

$ brew install yj

Binaries for Linux, macOS, and Windows are attached below.

Alternatively, you may also install yj via go get:

$ go get github.com/sclevine/yj