{"id":21806204,"url":"https://github.com/amhsirak/jsonwiz","last_synced_at":"2026-03-09T20:31:39.705Z","repository":{"id":182293762,"uuid":"666515853","full_name":"amhsirak/jsonwiz","owner":"amhsirak","description":"Manipulate and interact with JSON files right from the command line","archived":false,"fork":false,"pushed_at":"2023-07-20T14:00:25.000Z","size":44,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-15T15:57:23.336Z","etag":null,"topics":["cli-app","cli-program","command-line","command-line-tool","json","json-cli","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/jsonwiz/","language":"Python","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/amhsirak.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}},"created_at":"2023-07-14T18:10:34.000Z","updated_at":"2025-12-01T18:56:55.000Z","dependencies_parsed_at":"2023-07-30T04:46:47.183Z","dependency_job_id":null,"html_url":"https://github.com/amhsirak/jsonwiz","commit_stats":null,"previous_names":["karishmashuklaa/jcli","karishmashuklaa/jsonwiz","karishmashuklaa/jsoncli","amhsirak/jsonwiz"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amhsirak/jsonwiz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fjsonwiz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fjsonwiz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fjsonwiz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fjsonwiz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amhsirak","download_url":"https://codeload.github.com/amhsirak/jsonwiz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fjsonwiz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cli-app","cli-program","command-line","command-line-tool","json","json-cli","python"],"created_at":"2024-11-27T12:18:22.190Z","updated_at":"2026-03-09T20:31:39.681Z","avatar_url":"https://github.com/amhsirak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ejsonwiz\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\n  🗷 A command line utility for manipulating JSON files \n\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![PyPI version](https://badge.fury.io/py/jsonwiz.svg)](https://badge.fury.io/py/jsonwiz)\n[![Downloads](https://static.pepy.tech/personalized-badge/jsonwiz?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=orange\u0026left_text=Downloads)](https://pepy.tech/project/jsonwiz)\n[![Package Status](https://img.shields.io/static/v1?label=status\u0026message=stable\u0026color=brightgreen)](https://pypi.org/project/jsonwiz/)\n  \n\u003c/div\u003e\n\n- [Overview](#overview)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Commands](#commands)\n- [Arguments](#arguments)\n- [Pass JSON values](#pass-json-values)\n- [Pass Arrays](#pass-arrays)\n  \n## Overview\njsonwiz is a command-line tool for working with JSON files. You can retrieve, modify, add or delete any value in the JSON file, then save the changes back to disk. To access a specific property deep in the tree, you can navigate nested objects and arrays using the dot (.) or slash (/) syntax.\n\n## Installation\n\njsonwiz can be installed via pip through PyPi\n\n```\npip install jsonwiz\n```\n\n## Usage\n\nOnce jsonwiz is installed, you can use the following command to interact with the cli\n\n```\njsonwiz COMMAND [FILE] [PATH] [VALUE] [--ARGS]\n```\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCOMMAND\u003c/td\u003e\n     \u003ctd\u003eCommand to run\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eFILE\u003c/td\u003e\n     \u003ctd\u003ePath to JSON file\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePATH\u003c/td\u003e\n     \u003ctd\u003eKey name or path (dot notation or slash notation)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eVALUE\u003c/td\u003e\n     \u003ctd\u003eThe new value for `set` command\u003c/td\u003e\n  \u003c/tr\u003e\n   \u003ctr\u003e\n    \u003ctd\u003eARGS\u003c/td\u003e\n     \u003ctd\u003eOptional arguments to pass. Check below\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Example\n\n```\njsonwiz set example.json person.name \"John\" --type string\n```\nThis would write a `name` key into the `person` object, and set the value to `John` as a string\n\n```json\n  \"person\": {\n    \"name\": \"John\"\n  }\n```\n\n## Commands\n\n### get\nThe `get` command fetches an existing value, and outputs it to the console.\n\n```\njsonwiz get example.json person.name\n```\n\n### set\nThe `set` command will create or replace a key. If the key exists, it will override the exisiting value. It also automatically creates any parent objects if necessary.\n\n```\njsonwiz set example.json person.age 32 --type string \n```\n\nThe data type of the new value is guessed by the format. To assert required data type, pass the `--type` argument. [Read about it here.](#arguments)\n\n### delete\nThe `delete` command will delete an existing key, and fail if the key or any parent objects don't exist.\n\n```\njsonwiz delete example.json person.age\n```\n\n### validate\nThe `validate` command simply checks if the input JSON is valid or not.\n\n```\njsonwiz validate example.json\n```\n\n## Arguments\n\n### `--type`\nThe `--type` is an optional argument to specify the data type of the new value. To be used with the `set` command.\n\nSupported types are - `string`, `integer`, `float`, `boolean`, `null` and `object`\n\nExample: Pass a `boolean` value\n```\njsonwiz set example.json person.subscribed true --type boolean\n```\nOutput:\n```json\n{\n  \"person\": {\n    \"name\": \"John\",\n    \"subscribed\": true\n  }\n}\n```\n## Pass JSON values\nIt is possible to add entire JSON fragments to your file by replacing an existing object/creating a new object. Recommended to use `--type` object to correctly parse your value as JSON when applying to the document. *Make sure to properly escape your quotes when attempting this.*\n\n```\njsonwiz set example.json person.address '{\\\"city\\\":\\\"Mumbai\\\"}' --type object\n```\nOutput:\n```json\n  \"person\": {\n    \"address\": {\n      \"city\": \"Mumbai\"\n    }\n  }\n```\n\n## Pass Arrays\nYou can traverse arrays just like any other object, simply by specifying the array index as the key. Make sure to use `--type` object for array insertions to work properly. *Make sure to properly escape your quotes when attempting this.*\n\n\u003cdetails\u003e\n  \u003csummary\u003eSample JSON\u003c/summary\u003e\n  \n  ```json\n  {\n  \"person\": {\n    \"address\": {\n      \"city\": \"Mumbai\"\n    },\n    \"items\": [\n      {\n        \"name\": \"item1\"\n      },\n      {\n        \"name\": \"item2\"\n      }\n    ]\n  }\n}\n  ```\n\u003c/details\u003e\n\n### get\n```\njsonwiz get example.json person.items.0.name\n```\n\n### set\n\n1. Create empty array\n   \n```\njsonwiz get example.json person.jobs [] --type object\n```\n\n2. Create arrays with no strings\n```\njsonwiz get example.json person.jobs [1,2,3] --type object\n```\n\n3. Create arrays with string values\n```\njsonwiz my_list '[\\\"value1\\\", \\\"value2\\\", \\\"value3\\\"]' --type object\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famhsirak%2Fjsonwiz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famhsirak%2Fjsonwiz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famhsirak%2Fjsonwiz/lists"}