{"id":18041937,"url":"https://github.com/bruceadams/yj","last_synced_at":"2025-04-06T00:09:06.014Z","repository":{"id":33792026,"uuid":"162501241","full_name":"bruceadams/yj","owner":"bruceadams","description":" Command line tool that converts YAML to JSON ","archived":false,"fork":false,"pushed_at":"2024-08-16T10:37:41.000Z","size":178,"stargazers_count":111,"open_issues_count":6,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T22:10:01.752Z","etag":null,"topics":["command-line-tool","hacktoberfest","json","yaml"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/bruceadams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2018-12-19T23:19:51.000Z","updated_at":"2025-01-18T15:09:15.000Z","dependencies_parsed_at":"2024-06-20T16:24:41.571Z","dependency_job_id":"f56bf3a0-befb-44d6-b31c-0dcc86ba06f5","html_url":"https://github.com/bruceadams/yj","commit_stats":{"total_commits":151,"total_committers":5,"mean_commits":30.2,"dds":"0.32450331125827814","last_synced_commit":"81b85207e07bafde4948c20ee005bb40fae35b64"},"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruceadams%2Fyj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruceadams%2Fyj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruceadams%2Fyj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruceadams%2Fyj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bruceadams","download_url":"https://codeload.github.com/bruceadams/yj/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415967,"owners_count":20935387,"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":["command-line-tool","hacktoberfest","json","yaml"],"created_at":"2024-10-30T16:13:26.587Z","updated_at":"2025-04-06T00:09:05.986Z","avatar_url":"https://github.com/bruceadams.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YJ - YAML to JSON\n[![Build Status](https://api.cirrus-ci.com/github/bruceadams/yj.svg)](https://cirrus-ci.com/github/bruceadams/yj)\n\nSimple command line tool to convert a YAML input file into a JSON output file.\n\n## How to, etc.\n\n### Built in help\n\n```bash\n% yj --help\nCommand line tool that converts YAML to JSON\n\nUsage: yj [OPTIONS] [INPUT]\n\nArguments:\n  [INPUT]  Input YAML file name. Defaults to stdin\n\nOptions:\n  -c, --compact          Use compact formatting for the JSON output\n  -y, --yaml             Format the output as YAML instead of JSON\n  -j, --json             Parse the input as JSON. For most use cases, this\n                         option makes no difference. Valid JSON is valid\n                         YAML, so JSON input will (should?) parse\n                         correctly even when being handled with the YAML\n                         parser. Use this option when you want failure\n                         (instead of weird results) when the input is\n                         invalid JSON\n  -o, --output \u003cOUTPUT\u003e  Output file name for the JSON. Defaults to stdout\n  -h, --help             Print help information\n  -V, --version          Print version information\n```\n\n### Installing\n\nLocal build and install with `cargo`:\n\n```bash\n$ cargo install yj\n```\n\nPrebuilt binaries are available on\n[Github releases](https://github.com/bruceadams/yj/releases)\nfor some common platforms.\n\nOn macOS, the prebuilt binary can be installed using\n[Homebrew](https://brew.sh). Unfortunately, Homebrew picked up a\ndifferent utility with the name `yj` after I chose that name here.\nSo, a simple `brew install yj` gets that tool, not this one 😞.\n\n```bash\n$ brew tap bruceadams/utilities\n$ brew install bruceadams/utilities/yj\n```\n\nAlternatively on macOS, you may also install `yj` using [MacPorts](https://www.macports.org):\n\n```bash\n$ sudo port selfupdate\n$ sudo port install yj\n```\n\nMinimal Docker images are available on\n[Docker Hub](https://cloud.docker.com/repository/docker/bruceadams/yj):\n\n```bash\n$ docker pull bruceadams/yj\n```\n\n### Example runs\n\n```bash\n$ cat .travis.yml\nlanguage: rust\nos:\n  - linux\n  - osx\n  - windows\nrust:\n  - stable\n  - beta\n  - nightly\nmatrix:\n  allow_failures:\n    - rust: nightly\n  fast_finish: true\n$ yj .travis.yml\n{\n  \"language\": \"rust\",\n  \"os\": [\n    \"linux\",\n    \"osx\",\n    \"windows\"\n  ],\n  \"rust\": [\n    \"stable\",\n    \"beta\",\n    \"nightly\"\n  ],\n  \"matrix\": {\n    \"allow_failures\": [\n      {\n        \"rust\": \"nightly\"\n      }\n    ],\n    \"fast_finish\": true\n  }\n}\n$ echo pi: 3.1415926 | yj\n{\n  \"pi\": 3.1415926\n}\n$ echo pi: 3.1415926 | yj -c\n{\"pi\":3.1415926}$\n```\n\n## Build\n\nBuild it your self with Rust 2018, which needs a recent installation of Rust.\nGet Rust installed from https://rustup.rs/.\n\n```bash\ncargo build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruceadams%2Fyj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbruceadams%2Fyj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruceadams%2Fyj/lists"}