github TomWright/dasel v3.6.0

latest releases: v3.8.0, v3.7.0
10 hours ago

Added

  • --compact flag — New CLI flag to produce compact output with no indentation or newlines. Supported for JSON, TOML, YAML, and XML formats.

$ echo '{"name": "Tom", "age": 30}' | dasel -i json -o json --compact
{"name":"Tom","age":30}

Changed

  • stringify produces compact output — The stringify function now serializes values in compact form by default, which is the expected behavior when embedding serialized values in a query.

stringify("json", {"a": 1, "b": 2})
// "{"a":1,"b":2}"

Fixed

  • Compact/pretty output support for all format writers (#457) — WriterOptions.Compact is now honored by JSON, TOML, YAML, and XML writers. Previously, the option existed but was ignored by all writers.
    • JSON: Omits newlines, indentation, and spaces after colons
    • TOML: Uses inline tables and single-line arrays
    • YAML: Uses flow style ({a: 1, b: 2} / [1, 2, 3])
    • XML: Removes all indentation, including around comments and processing instructions

Don't miss a new dasel release

NewReleases is sending notifications on new releases.