{"id":16188489,"url":"https://github.com/konsumer/json2x","last_synced_at":"2025-07-20T20:05:15.037Z","repository":{"id":142068004,"uuid":"129333554","full_name":"konsumer/json2x","owner":"konsumer","description":"Use your JSON data to generate models for various things","archived":false,"fork":false,"pushed_at":"2019-08-29T04:26:45.000Z","size":466,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-20T20:03:39.393Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/konsumer.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":"2018-04-13T01:57:56.000Z","updated_at":"2020-05-13T15:56:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1edaf47-b7ad-4b16-9376-01a4a6284312","html_url":"https://github.com/konsumer/json2x","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/konsumer/json2x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fjson2x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fjson2x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fjson2x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fjson2x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konsumer","download_url":"https://codeload.github.com/konsumer/json2x/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fjson2x/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266189673,"owners_count":23890065,"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":[],"created_at":"2024-10-10T07:27:11.054Z","updated_at":"2025-07-20T20:05:15.008Z","avatar_url":"https://github.com/konsumer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json2x\n\n[![Build Status](https://travis-ci.org/konsumer/json2x.svg?branch=master)](https://travis-ci.org/konsumer/json2x) [![Greenkeeper badge](https://badges.greenkeeper.io/konsumer/json2x.svg)](https://greenkeeper.io/)\n\nUse your JSON data to generate models for various things.\n\nI often have a bunch of JSON mock that I need to get models for some other system from. This is a framework to generate all of the following:\n\n* GraphQL types\n* protobuf messages\n* JSONSchema\n\nIf you don't want the actual model of the children, based on your data, you can use other things like [graphql-type-json](https://github.com/taion/graphql-type-json) or whatever. The idea is here is that you actually want to define the model of your data, and it's reasonably structured.\n\nIt looks at as many examples as you give it and learns from multiple records, so if you have lots of mock, use it.\n\n## installation\n\nIf you want to actually install it use this:\n\n```\nnpm i -g json2x\n```\n\nYou can also just do this, to run it without installing it globally:\n\n```\nnpx json2x\n```\n\n## usage\n\n```\njson2x \u003ccommand\u003e\n\nCommands:\n  json2x graphql \u003cMODEL\u003e \u003cFILES...\u003e     Generate GraphQL types from your data\n  json2x jsonschema \u003cMODEL\u003e \u003cFILES...\u003e  Generate JSONSchema from your data\n  json2x proto \u003cMODEL\u003e \u003cFILES...\u003e       Generate protobuf message-definitions from your data\n\nOptions:\n  -h, --help     Show help                                             [boolean]\n  -v, --version  Show version number                                   [boolean]\n\nExamples:\n  json2x graphql -h     Get some help with the graphql command\n  json2x jsonschema -h  Get some help with the jsonschema command\n  json2x proto -h       Get some help with the proto command\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fjson2x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonsumer%2Fjson2x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fjson2x/lists"}