{"id":18744018,"url":"https://github.com/at1as/json-builder","last_synced_at":"2026-05-05T18:36:25.351Z","repository":{"id":78922971,"uuid":"76755778","full_name":"at1as/json-builder","owner":"at1as","description":"Visually create, explore or modify JSON payloads","archived":false,"fork":false,"pushed_at":"2016-12-18T06:15:52.000Z","size":164,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T13:47:37.619Z","etag":null,"topics":["electron","javascript","json","json-builder","json-documents","schema"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/at1as.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-12-18T00:59:45.000Z","updated_at":"2025-03-28T13:00:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"51156bed-6380-401a-9982-7e25cb72eb6e","html_url":"https://github.com/at1as/json-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/at1as/json-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/at1as%2Fjson-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/at1as%2Fjson-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/at1as%2Fjson-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/at1as%2Fjson-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/at1as","download_url":"https://codeload.github.com/at1as/json-builder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/at1as%2Fjson-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32663422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["electron","javascript","json","json-builder","json-documents","schema"],"created_at":"2024-11-07T16:13:26.584Z","updated_at":"2026-05-05T18:36:25.328Z","avatar_url":"https://github.com/at1as.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON-Builder\n\nVisually create, explore or modify JSON payloads. This tool provides a way to safely change a particular value within a saved JSON file without needing a text editor. Used to quickly iterate on some content within [this book](https://www.amazon.com/Photography-Cookbook-Photographic-Recipes-Michael-ebook/dp/B01CUQ4L7O) (from which examples below are taken).\n\n\n## Screenshot\n*Modify Data*\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://at1as.github.io/github_repo_assets/json-builder-1.png\" width=\"600px\"/\u003e\n\u003c/p\u003e\n\n*Preview Data*\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://at1as.github.io/github_repo_assets/json-builder-2.png\" width=\"600px\"/\u003e\n\u003c/p\u003e\n\n## Importing / Modifying JSON\n\nExpects two pices of infomration: a JSON payload, and a defined schema\n\n### 1 of 2 : JSON Data for Import\n\nExpects a JSON document with an array of objects stored under a key. The structure should match the following format and a unique \"id\" field of type Integer or String is recommended:\n\n```\n{\n  \"\u003cglobal_key\u003e\" : [\n    {\"id\": \"1\", \"name\": \"first item!\", ... },\n    {\"id\": \"2\", \"name\": \"second item!\", ... },\n    {\"id\": \"3\", \"name\": \"third item!\", ... },\n    {\"id\": \"4\", \"name\": \"forth item!\", ... }\n  ]\n}\n```\n\nKeys should not contain dashes ('-') as this is used internally for nesting representation. Values may themselves be nested objects. If a second top level key is given, underneath `global_key` (at the same level), the first key will be used by default. Otherwise the desired key to use can be set in the UI under the `Data Key` input.\n\n#### JSON Data for Import - Example\n\n```\n{\n  \"recipes\": [\n    {\n      \"name\": \"Animals\",\n      \"id\": \"1\",\n      \"type\": \"indoor\",\n      \"camera\": {\n        \"mode\": \"Aperture, Program; Manual if using flash\",\n        \"aperture setting\": \"f/5.6 - f/8\",\n        \"iso\": \"200 - 800 ISO\",\n        \"white balance\": \"\",\n        \"shutter mode\": \"Continuous\",\n        \"shutter speed\": \"If manual: 1/30th or faster\",\n        \"focus points\": \"One focus point/area, selected by you\",\n        \"focus mode\": \"If animal moves: AI Servo/AF-C\",\n        \"flash compensation\": \"\",\n        \"metering\": \"Evaluative/3D Color Matrix\",\n        \"drive\": \"\",\n        \"exposure compensation\": \"\",\n        \"mount\": \"\"\n      },\n      \"lens\": {\n        \"focal length\": \"Between 35 and 135 mm\",\n        \"min. lens aperture\": \"Fast (Low \\\"F-number\\\"), just in case\",\n        \"examples\": [\n          \"24-70 f/2.8 (flexible)\",\n          \"50mm f/1.8 (fast!)\"\n        ],\n        \"other\": \"\"\n      },\n    },\n  ]\n}\n```\n\nFor the moment this file to read data from MUST be titled `existing_json_data.json` and placed in the top-level-directory of this repo. This will be configurable later.\n\n\n### 2 of 2 : JSON Schema\n\nFor the moment, JSON documents must be defined in a schema. It is difficult otherwise to infer the schema since objects may be empty.\n\nThe schema should follow the structure of the JSON document, defining three types:\n\n* `\"String\"` (text data)\n* `\"Text\"` (Same as above, but will render a \\\u003ctextarea\\\u003e element to more easily write many sentences)\n* `[]` (an array of elements)\n* `{}` (a subobject with the keys and values defined within - see \"camera\" below)\n\nCurrently integers should simply be saved as strings.\n\n\n\n#### JSON Schema - Example:\n\n```\n{\n  \"recipes\": [\n    {\n      \"name\": \"String\",\n      \"id\": \"String\",\n      \"type\": \"String\",\n      \"camera\":{\n        \"mode\": \"String\",\n        \"aperture setting\": \"String\",\n        \"iso\": \"String\",\n      },\n      \"lens\":{\n        \"focal length\": \"String\",\n        \"examples\": [],\n      },\n      \"flash\":{\n        \"type\": \"String\",\n        \"settings\": \"String\",\n      },\n      \"other\": [],\n    }\n  ]\n}\n```\n\nThis file must be titled `data.json`\n\nNote that keys will display in the UI in the order they are listed in the data.json schema.\n\n\n## Building new JSON files\n\nSame steps as above (with defining the schema), however the data import step is clearly not necessary.\n\n\n### Running\n\n```bash\n$ git clone https://github.com/at1as/json-builder.git\n$ cd json-builder\n$ npm install\n\n# Create a schema in data.json and \n# For importing data copy JSON data to json-builder/ folder and title it existing_json_data.json\n\n$ npm start\n```\n\n### Operations\n* Add Page (add a new JSON object at the end of the list – would create an Item 53 in the screenshot above)\n* Delete Page (delete the currently displayed page. Will re-index IDs so they are sequential and do no skip numbers)\n* Generate (save data to `json_output.json`)\n* Import (import existing data from `existing_json_data.json`)\n* Preview (preview JSON object in HTML table form to quickly get an overview)\n\n### Notes\n\n* Generated JSON objects will be stored in the json-builder/ directory with the name `json_output.json`\n* Will save data periodically to `generated-backup.json` (on 'Add Page' or 'Delete Page' operations). However these backups are not rotated, so on the next such operation, the file will be overwritten. It's meant as a one-operation \"undo\" for mistakes.\n\n\n### Disclaimer\n\n* Built quickly for a specific task I had in a langauge that's not my first choice. Seems to work, but not exactly code I'm proud of. Tread carefully.\n\n\n### TODO\n\n* Test Schema with array of nested objects (unlikely to work)\n* TODO: Add integer / float types\n* TODO: Add Enum type (so items can be one of only several defined values)\n* Bug: Does not handle second level nesting. Nested objects in arrays are ignored\n* Bug: Does not handle second level nesting. Second level nested objects are saved on the top level item\n* TODO: Preview does support second level nesting\n* TODO: Major code cleanup required\n* TODO: Reorder items\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fat1as%2Fjson-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fat1as%2Fjson-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fat1as%2Fjson-builder/lists"}