{"id":17797353,"url":"https://github.com/mbrukman/yaml2json","last_synced_at":"2025-03-17T03:31:49.805Z","repository":{"id":53489672,"uuid":"226961528","full_name":"mbrukman/yaml2json","owner":"mbrukman","description":"Convert YAML to JSON and vice versa","archived":false,"fork":false,"pushed_at":"2024-08-18T02:22:06.000Z","size":40,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T17:35:45.704Z","etag":null,"topics":["cli","go","golang","json","json2yaml","python","yaml","yaml2json"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbrukman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-09T20:28:49.000Z","updated_at":"2024-08-18T02:22:08.000Z","dependencies_parsed_at":"2024-06-19T11:30:59.805Z","dependency_job_id":"b2f2a6b9-cbb2-4444-aae0-8962108d7aa0","html_url":"https://github.com/mbrukman/yaml2json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrukman%2Fyaml2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrukman%2Fyaml2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrukman%2Fyaml2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrukman%2Fyaml2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbrukman","download_url":"https://codeload.github.com/mbrukman/yaml2json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841211,"owners_count":20356443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","go","golang","json","json2yaml","python","yaml","yaml2json"],"created_at":"2024-10-27T11:54:03.691Z","updated_at":"2025-03-17T03:31:49.526Z","avatar_url":"https://github.com/mbrukman.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaml2json\n\n[![Python build status][yaml2json-python-ci-badge]][yaml2json-python-ci-url]\n[![Go build status][yaml2json-go-ci-badge]][yaml2json-go-ci-url]\n[![Go Report Card][go-report-card-badge]][go-report-card-url]\n\n[yaml2json-python-ci-badge]: https://github.com/mbrukman/yaml2json/actions/workflows/python.yaml/badge.svg?query=branch%3Amain\n[yaml2json-python-ci-url]: https://github.com/mbrukman/yaml2json/actions/workflows/python.yaml?query=branch%3Amain\n[yaml2json-go-ci-badge]: https://github.com/mbrukman/yaml2json/actions/workflows/go.yaml/badge.svg?query=branch%3Amain\n[yaml2json-go-ci-url]: https://github.com/mbrukman/yaml2json/actions/workflows/go.yaml?query=branch%3Amain\n[go-report-card-badge]: https://goreportcard.com/badge/github.com/mbrukman/yaml2json\n[go-report-card-url]: https://goreportcard.com/report/github.com/mbrukman/yaml2json\n\nThis project provides a simple library and CLI for converting YAML to JSON,\nwritten separately in Python and Go.\n\n# Usage\n\nInstall the Go utilities:\n\n```shell\n$ go install github.com/mbrukman/yaml2json/cmd/{yaml2json,json2yaml}@latest\n```\n\nConvert YAML \u0026rarr; JSON:\n\n```shell\n# read from stdin\n$ [... generate some YAML...] | yaml2json\n\n# read from a file\n$ yaml2json foo.yaml\n```\n\nConvert JSON \u0026rarr; YAML:\n\n```shell\n# read from stdin\n$ [... generate some JSON...] | json2yaml\n\n# read from a file\n$ json2yaml foo.json\n```\n\nIn all cases, the output is to stdout.\n\nFor the equivalent Python implementations, see the [`python`](python) directory\nfor details.\n\n# Motivation\n\nSome programs and utilities only support JSON as their configuration input\nformat; however, JSON is very strict and limited (which makes it great for\ncomputers and programs), but it's insufficient for the needs of human\ndevelopers. A number of issues result from humans directly editing JSON:\n\n* **JSON does not support comments,** so it's not possible to add context or\n  annotations for why something is the way it is\n* **JSON is quite verbose,** requiring double quotes around each field name\n* JSON requires commas at the end of each key/value pair, but disallows a comma\n  after the last key/value in an object — this is minor, but still somewhat\n  tedious to have to remember to deal with\n\nThus, it's easier to write simple configs in YAML, but in that case, we find\nourselves in need of having a simple YAML-to-JSON converter, and rather than\nre-implement the same simple converter within each project, I wanted to have a\nstand-alone project which has this already pre-built.\n\n## Why YAML?\n\n**Or, why not [another language] instead?**\n\nBecause YAML is (mostly) simple, readable, and well-known. It supports comments,\ndoes not require double quotes, or commas after fields. For many use cases,\nwhat's needed is a simple hierarchical configuration format with comments for\nannotating rationale, providing context, or links to related work. In those\ncases, advanced features such as computation, reuse, or overrides are\nunnecessary. If you need those types of features, you can use a language such as\n[Jsonnet](https://jsonnet.org/), which supports templates and overrides, and it\nhas its own conversion to JSON.\n\n## Contributing\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md) for details.\n\n## License\n\nApache 2.0; see [`LICENSE`](LICENSE) for details.\n\n## Disclaimer\n\nThis project is not an official Google project. It is not supported by Google\nand Google specifically disclaims all warranties as to its quality,\nmerchantability, or fitness for a particular purpose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbrukman%2Fyaml2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbrukman%2Fyaml2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbrukman%2Fyaml2json/lists"}