Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dirtsimple/yaml2json
Full-fidelity YAML/JSON command-line converters in PHP (for use w/jqmd, imposer, etc.)
https://github.com/dirtsimple/yaml2json
Last synced: about 22 hours ago
JSON representation
Full-fidelity YAML/JSON command-line converters in PHP (for use w/jqmd, imposer, etc.)
- Host: GitHub
- URL: https://github.com/dirtsimple/yaml2json
- Owner: dirtsimple
- License: mit
- Created: 2018-03-18T04:13:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-08T20:40:20.000Z (about 5 years ago)
- Last Synced: 2024-08-17T20:32:52.850Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 607 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YAML/JSON Converters
This is a pure-PHP YAML to JSON (and JSON to YAML) converter pair for use with [jqmd](https://github.com/bashup/jqmd), [imposer](https://github.com/dirtsimple/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](https://github.com/dirtsimple/clean-yaml/) package, to support optimum diffing and readability.