{"id":28417211,"url":"https://github.com/fgeller/json-structure","last_synced_at":"2026-05-09T00:12:07.603Z","repository":{"id":61624599,"uuid":"535375028","full_name":"fgeller/json-structure","owner":"fgeller","description":"converts a json value to one that describes its structure","archived":false,"fork":false,"pushed_at":"2022-09-20T15:22:35.000Z","size":17,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-16T07:08:13.568Z","etag":null,"topics":["cli","golang","json","json-schema"],"latest_commit_sha":null,"homepage":"","language":"Go","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/fgeller.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}},"created_at":"2022-09-11T17:34:21.000Z","updated_at":"2022-10-14T01:22:38.000Z","dependencies_parsed_at":"2022-10-18T18:00:43.372Z","dependency_job_id":null,"html_url":"https://github.com/fgeller/json-structure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fgeller/json-structure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeller%2Fjson-structure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeller%2Fjson-structure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeller%2Fjson-structure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeller%2Fjson-structure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgeller","download_url":"https://codeload.github.com/fgeller/json-structure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeller%2Fjson-structure/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261972726,"owners_count":23238538,"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":["cli","golang","json","json-schema"],"created_at":"2025-06-04T04:09:55.491Z","updated_at":"2026-05-09T00:12:02.571Z","avatar_url":"https://github.com/fgeller.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json-structure\n\nReads a JSON value from stdin and converts it to a JSON value that describes the structure of the original value.\n\n## Example\n\n```\n% json-structure -help\nUsage of json-structure:\n  -flatten\n        flatten schemata in arrays and combine objects\n  -schema\n        output a json schema\n% cat sample.json \n{\n  \"productId\": 1,\n  \"productName\": \"A green door\",\n  \"price\": 12.50,\n  \"tags\": [ \"home\", \"green\" ]\n}\n% cat sample.json | json-structure | jq\n{\n  \"price\": \"number\",\n  \"productId\": \"number\",\n  \"productName\": \"string\",\n  \"tags\": [\n    \"string\",\n    \"string\"\n  ]\n}\n% cat sample.json | json-structure -flatten | jq\n{\n  \"price\": \"number\",\n  \"productId\": \"number\",\n  \"productName\": \"string\",\n  \"tags\": [\n    \"string\"\n  ]\n}\n% cat sample.json | json-structure -flatten -schema | jq\n{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"price\": {\n      \"type\": \"number\"\n    },\n    \"productId\": {\n      \"type\": \"number\"\n    },\n    \"productName\": {\n      \"type\": \"string\"\n    },\n    \"tags\": {\n      \"type\": \"array\",\n      \"contains\": {\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n```\n\n## Installation\n\n```\n% go install github.com/fgeller/json-structure@latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgeller%2Fjson-structure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgeller%2Fjson-structure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgeller%2Fjson-structure/lists"}