dirtsimple/yaml2json

Full-fidelity YAML/JSON command-line converters

Maintainers

👁 pjeby

Package info

github.com/dirtsimple/yaml2json

pkg:composer/dirtsimple/yaml2json

Statistics

Installs: 4 202

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 1

v1.3.0 2026-06-07 01:12 UTC

Requires

None

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT df064e8960af6f14dfc060a4f8488c8351603366

This package is auto-updated.

Last update: 2026-06-07 01:12:53 UTC


README

This is a pure-PHP YAML to JSON (and JSON to YAML) converter pair for use with jqmd, imposer, and similar tools in environments where better conversion tools are not available.

The converters take no options, reading one format from stdin and writing the other to stdout. The executables are PHARs named yaml2json.php and json2yaml.php to avoid conflict with other executables with these base names, and are distributed as PHARs to avoid dependency conflicts.

(That is, requiring this package installs only the executable PHARs to vendor/bin to be used purely as command-line tools, without affecting the requiring project's autoloader or dependencies.)

As of version 1.2, the output of json2yaml.php is generated using the dirtsimple/clean-yaml package, to support optimum diffing and readability.