{"id":15012981,"url":"https://github.com/bonitoflakez/gojson2class","last_synced_at":"2026-01-11T01:35:37.785Z","repository":{"id":168497481,"uuid":"643609031","full_name":"bonitoflakez/goJSON2CLASS","owner":"bonitoflakez","description":"a utility that converts JSON schema to classes","archived":false,"fork":false,"pushed_at":"2023-12-12T19:01:06.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T08:42:34.614Z","etag":null,"topics":["c","cpp","golang","java","json","json-schema","jsonschema","rust","typescript"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bonitoflakez.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":"2023-05-21T17:48:43.000Z","updated_at":"2023-06-11T17:40:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"234e2b92-d782-4f9f-ad35-9b412d126be2","html_url":"https://github.com/bonitoflakez/goJSON2CLASS","commit_stats":null,"previous_names":["salientarc/gojson2class"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonitoflakez%2FgoJSON2CLASS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonitoflakez%2FgoJSON2CLASS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonitoflakez%2FgoJSON2CLASS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonitoflakez%2FgoJSON2CLASS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonitoflakez","download_url":"https://codeload.github.com/bonitoflakez/goJSON2CLASS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246651240,"owners_count":20811990,"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":["c","cpp","golang","java","json","json-schema","jsonschema","rust","typescript"],"created_at":"2024-09-24T19:43:33.423Z","updated_at":"2026-01-11T01:35:37.757Z","avatar_url":"https://github.com/bonitoflakez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goJSON2CLASS\n\n`goJSON2CLASS` is a utility that converts JSON schema to classes\n\n## Usage\n\n```txt\nUsage: goJSON2CLASS -l \u003ctarget-lang\u003e -s \u003cschema.json\u003e -o \u003coutput.ext\u003e\n\n\t-l \u003e\u003e choose a language.\n\t\tExample: `-l rust` (default: nil)\n\n\t-s \u003e\u003e path to file containing JSON schema. (default: schema.json)\n\t\tExample: `-s schema.json`\n\n\t-o \u003e\u003e path to output file with extension. (default: output.txt)\n\t\tExample: `-o output.rs`\n\n\t-p \u003e\u003e define public if supported by language (default: false)\n\t\tExample: `-p`\n```\n\n## Supported Inputs\n\ngoJSON2CLASS only supports JSON Schema\n\n## Supported Languages\n\nC, Go, C++, Java, Rust, TypeScript\n\n_If your favorite language is missing- please generate an issue or implement it by yourself._\n\n---\n\n### [Installation](./docs/INSTALLATION.md)\n\n---\n\n### Usage Example\n\n#### Sample Schema\n\n```json\n{\n  \"title\": \"Root\",\n  \"properties\": {\n    \"property1\": {\n      \"type\": \"string\"\n    },\n    \"property2\": {\n      \"type\": \"integer\"\n    },\n    \"property3\": {\n      \"type\": \"object\",\n      \"title\": \"Property3\",\n      \"properties\": {\n        \"nestedProperty1\": {\n          \"type\": \"boolean\"\n        },\n        \"nestedProperty2\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"nestedProperty3\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n  }\n}\n```\n\n#### Generating C Code\n\n```txt\n\u003e\u003e goJSON2CLASS -l c -s schema.json -o output.c\nDone!\n```\n\nOutput\n\n```c\n#include \u003cstdio.h\u003e\n#include \u003cstdlib.h\u003e\n#include \u003cstdbool.h\u003e\n\n#define PROPERTY3_NESTEDPROPERTY2_SIZE 50\n\ntypedef struct Root Root;\ntypedef struct Property3 Property3;\n\nstruct Property3 {\n    bool nestedProperty1;\n    char* nestedProperty2[PROPERTY3_NESTEDPROPERTY2_SIZE];\n    char* nestedProperty3;\n};\nstruct Root {\n    char* property1;\n    int property2;\n    Property3 property3;\n};\n```\n\n---\n\n### [Examples](./docs/Example.md)\n\n---\n\n### LICENSE\n\n[GPL](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonitoflakez%2Fgojson2class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonitoflakez%2Fgojson2class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonitoflakez%2Fgojson2class/lists"}