{"id":15089690,"url":"https://github.com/simonrupf/convert2json","last_synced_at":"2026-05-16T11:01:03.734Z","repository":{"id":177874914,"uuid":"658347384","full_name":"simonrupf/convert2json","owner":"simonrupf","description":"Utilities to convert CSV, TOML, XML \u0026 YAML to JSON, including jq wrappers, for use on the command line.","archived":false,"fork":false,"pushed_at":"2026-05-16T09:02:56.000Z","size":470,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-16T09:38:46.006Z","etag":null,"topics":["converter","csv","jq","json","toml","xml","yaml"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/convert2json","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonrupf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-MIT","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-25T13:39:45.000Z","updated_at":"2026-05-16T09:02:59.000Z","dependencies_parsed_at":"2026-05-16T11:00:39.123Z","dependency_job_id":null,"html_url":"https://github.com/simonrupf/convert2json","commit_stats":{"total_commits":157,"total_committers":2,"mean_commits":78.5,"dds":0.3821656050955414,"last_synced_commit":"e2ff379f8d600fe9cddb90ad40c73d57d34b9e5f"},"previous_names":["simonrupf/convert2json"],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/simonrupf/convert2json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrupf%2Fconvert2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrupf%2Fconvert2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrupf%2Fconvert2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrupf%2Fconvert2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonrupf","download_url":"https://codeload.github.com/simonrupf/convert2json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonrupf%2Fconvert2json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["converter","csv","jq","json","toml","xml","yaml"],"created_at":"2024-09-25T09:01:19.906Z","updated_at":"2026-05-16T11:01:03.695Z","avatar_url":"https://github.com/simonrupf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"convert2json\n============\nUtilities for use on the command line, to convert BSON, CBOR, CSV, INI, MessagePack,\nPlist, RSV, TOML, XML \u0026 YAML to JSON. For each supported format there is a tool\nfor use in a pipe as well as a wrapper which passes the converted input or files\nin the arguments to jaq or jq, for further querying and processing.\n\nOverview\n--------\nGoals:\n+ provide light-weight converters to JSON\n+ provide jaq and jq wrappers\n+ add support for additional formats having maintained [Serde](https://serde.rs/) implementations\n\nNon-Goals:\n- converting JSON into other data formats, consider [jyt](https://github.com/ken-matsui/jyt)\n- replicating [jq](https://jqlang.github.io/jq/), jaq or jq must be installed to\nuse the jq wrappers\n\nUsage examples\n--------------\n```\n# convert yaml to json\n$ echo foo: bar | yaml2json\n{\"foo\":\"bar\"}\n\n# query a value from a toml file\n$ tq -r .package.description Cargo.toml\nCLI utilities to convert BSON, CBOR, CSV, INI, MessagePack, Plist, RSV, TOML, XML \u0026 YAML into JSON and for use with jaq or jq.\n\n# query for environment variables that contain the current users username, using ini parser\n$ printenv | iq --compact-output '.USER as $user | with_entries(select(.value | contains($user))) | keys'\n[\"HOME\",\"LOGNAME\",\"OLDPWD\",\"PWD\",\"USER\",\"USERNAME\"]\n\n# csv2json \u0026 cq recognize 4 additional arguments\n$ csv2json --help\nUsage: csv2json [-d \u003cdelimiter\u003e] [-q \u003cquote\u003e] [-E \u003cescape\u003e] [--no-trim] [files...]\n\nReads CSV from files or standard input and converts this to JSON, emitted on standard output. Any errors are reported to standard error and result in a non-zero exit code.\n\nOptions:\n  -d, --delimiter   field delimiter to use when parsing CSV, defaults to: ,\n                    (comma)\n  -q, --quote       quote character to use when parsing CSV, defaults to: \"\n                    (double quote)\n  -E, --escape      escape character to use when parsing CSV, to escape quote\n                    characters within a field. By default, quotes get escaped by\n                    doubling them.\n  --no-trim         do not trim headers \u0026 fields. By default, both get trimmed\n                    of starting or trailing whitespace characters.\n  -h, --help        display usage information\n```\n\nAlternatives\n------------\n* Rust 🦀:\n  * [jyt](https://github.com/ken-matsui/jyt)\n  * [yaml2json](https://github.com/dafu-wu/yaml2json)\n  * [yaml2json-rs](https://github.com/Nessex/yaml2json-rs)\n* [Go 🐹](https://pkg.go.dev/search?q=yaml2json\u0026m=)\n* [JavaScript 🌐](https://www.npmjs.com/search?q=yaml2json)\n* [Python 🐍](https://pypi.org/search/?q=yaml2json)\n\nInstallation\n------------\nPackages are provided (statically linked) for Debian \u0026 Ubuntu, as wells as RPM\nbased Linux distributions and for\n[Alpine Linux](https://pkgs.alpinelinux.org/packages?name=convert2json).\n\nFor Ubuntu, MacOS (universal binaries for x86_64 \u0026 arm64) and Windows, archives\nwith pre-built (dynamically linked) binaries are provided, for manual installation.\n\nYou can find these packages and archives in the\n[releases](https://github.com/simonrupf/convert2json/releases).\n\nIf you have Rust and Cargo installed, you can build and update these tools using\n`cargo install convert2json`. See the feature matrix below, if you only need a\nsubset of the utilities.\n\nFeature Matrix\n--------------\nYou may not want to install all of the utilities or only a particular one. Each\nutility can be selected by itself or via group features. If no features are\nselected, all utilities get installed.\n\nMatrix of all selectable features:\n|             | to_json    | jq     |\n|-------------|----------- |--------|\n| bson        | bson2json  | bsonq  |\n| cbor        | cbor2json  | cborq  |\n| csv         | csv2json   | cq     |\n| ini         | ini2json   | iq     |\n| messagepack | msg2json   | msgq   |\n| plist       | plist2json | plistq |\n| rsv         | rsv2json   | rq     |\n| toml        | toml2json  | tq     |\n| xml         | xml2json   | xq     |\n| yaml        | yaml2json  | yq     |\n\nExamples:\n ```\n # install only yq \u0026 tq:\n cargo install convert2json --no-default-features --features yq,tq\n # install all the xml related tools:\n cargo install convert2json --no-default-features --features xml\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrupf%2Fconvert2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonrupf%2Fconvert2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonrupf%2Fconvert2json/lists"}