{"id":13587189,"url":"https://github.com/dskkato/rjo","last_synced_at":"2025-04-07T19:31:03.141Z","repository":{"id":54890025,"uuid":"172701024","full_name":"dskkato/rjo","owner":"dskkato","description":"A small utility to create JSON objects, written in Rust.","archived":false,"fork":false,"pushed_at":"2023-06-06T02:15:22.000Z","size":229,"stargazers_count":64,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-13T23:17:54.102Z","etag":null,"topics":["command-line","json","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dskkato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2019-02-26T11:45:31.000Z","updated_at":"2024-09-27T21:25:05.000Z","dependencies_parsed_at":"2024-01-06T13:25:43.901Z","dependency_job_id":null,"html_url":"https://github.com/dskkato/rjo","commit_stats":{"total_commits":126,"total_committers":2,"mean_commits":63.0,"dds":0.007936507936507908,"last_synced_commit":"d3db85e703a72abdd57d022f00cef1af335a5a5a"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskkato%2Frjo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskkato%2Frjo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskkato%2Frjo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dskkato%2Frjo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dskkato","download_url":"https://codeload.github.com/dskkato/rjo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223290424,"owners_count":17120914,"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","json","rust"],"created_at":"2024-08-01T15:06:04.864Z","updated_at":"2024-11-06T05:31:20.163Z","avatar_url":"https://github.com/dskkato.png","language":"Rust","funding_links":[],"categories":["Rust","JSON"],"sub_categories":["Open USP Tsukubai"],"readme":"# rjo\n\n[![rjo](https://img.shields.io/crates/v/rjo.svg)](https://crates.io/crates/rjo)\n[![Build Status](https://travis-ci.org/dskkato/rjo.svg?branch=master)](https://travis-ci.org/dskkato/rjo)\n[![Build status](https://ci.appveyor.com/api/projects/status/9cu385votebtm92e/branch/master?svg=true)](https://ci.appveyor.com/project/dskkato/rjo)\n[![codecov](https://codecov.io/gh/dskkato/rjo/branch/master/graph/badge.svg)](https://codecov.io/gh/dskkato/rjo)\n\nA small utility to create JSON objects.\n\n![](img/ss.png)\n\nThe origin of this package is [jpmens/jo](https://github.com/jpmens/jo), and was inspired by a Golang ported version , [skanehira/gjo](https://github.com/skanehira/gjo).\n\n## Installation\n\nOnly installation from souce is supported. You may need Rust 1.30 or higher. You can then use cargo to build everything.\n\n```sh\n$ cargo install rjo\n```\n\nor, clone and specify local directory:\n\n```sh\n$ git clone https://github.com/dskkato/rjo.git\n$ cd rjo\n$ cargo install --path .\n```\n\n\n## Usage\n\nCreating objects:\n```\n$ rjo -p name=jo n=17 parser=false\n{\n    \"name\": \"jo\",\n    \"n\": 17,\n    \"parser\": false\n}\n```\n\nor, arrays:\n```\n$ seq 1 10 | rjo -a\n[1,2,3,4,5,6,7,8,9,10]\n\n$ rjo -p -a Rust 0 false\n[\n    \"Rust\",\n    0,\n    false\n]\n```\n\nA more complex example:\n```sh\n$ rjo -p name=JP object=$(rjo fruit=Orange point=$(rjo x=10 y=20) number=17) sunday=false\n{\n    \"name\": \"JP\",\n    \"object\": {\n        \"fruit\": \"Orange\",\n        \"point\": {\n            \"x\": 10,\n            \"y\": 20\n        },\n        \"number\": 17\n    },\n    \"sunday\": false\n}\n```\n\n### multiple lines from `stdin`\n\nCurrently, `jo` assumes one x=y pair per line when reads from stdin, and multiple x=y pairs generate following results:\n\n```sh\necho -e \"a=b c=d \\n e=f g=h\" | jo\n{\"a\":\"b c=d \",\" e\":\"f g=h\"}\n```\n\nWhile, `rjo` translates `stdin` input line by line:\n\n```\necho -e \"a=b c=d \\n e=f g=h\" | rjo\n{\"a\":\"b\",\"c\":\"d\"}\n{\"e\":\"f\",\"g\":\"h\"}\n```\n\n## See also\n* [jo](https://github.com/jpmens/jo)\n* [gjo](https://github.com/skanehira/gjo)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdskkato%2Frjo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdskkato%2Frjo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdskkato%2Frjo/lists"}