{"id":18143269,"url":"https://github.com/watzon/json-to-crystal","last_synced_at":"2025-04-23T00:46:55.680Z","repository":{"id":57285355,"uuid":"121844018","full_name":"watzon/json-to-crystal","owner":"watzon","description":"Convert JSON structures into Crystal classes with JSON mappings","archived":false,"fork":false,"pushed_at":"2018-02-20T01:16:51.000Z","size":521,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T00:46:47.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/watzon.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":"2018-02-17T09:53:18.000Z","updated_at":"2021-05-05T07:26:10.000Z","dependencies_parsed_at":"2022-09-10T09:55:12.710Z","dependency_job_id":null,"html_url":"https://github.com/watzon/json-to-crystal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watzon%2Fjson-to-crystal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watzon%2Fjson-to-crystal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watzon%2Fjson-to-crystal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watzon%2Fjson-to-crystal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watzon","download_url":"https://codeload.github.com/watzon/json-to-crystal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250348873,"owners_count":21415907,"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-11-01T19:06:18.138Z","updated_at":"2025-04-23T00:46:55.662Z","avatar_url":"https://github.com/watzon.png","language":"JavaScript","funding_links":[],"categories":["\u003ca name=\"JavaScript\"\u003e\u003c/a\u003eJavaScript"],"sub_categories":[],"readme":"# JSON to Crystal\n\nConvert JSON structures to Crystal classes.\nA hosted version is available at https://watzon.me/projects/json-to-crystal.\n\n## Usage\n\n```javascript\nconst JsonToCrystal = require('json-to-crystal')\n\nconst json2crystal = new JsonToCrystal()\nconsole.log(json2crystal.parse(`\n{\n    \"string\": \"Hello world\",\n    \"boolean\": true,\n    \"integer\": 12302932,\n    \"float: 232.23,\n    \"another_class\": {\n        \"arr\": [1, 2, 3],\n        \"hello\": \"World!\"\n    }\n}`))\n```\n\n```\nclass AutoGenerated\n\n  JSON.mapping({\n    string: { type: String },\n    boolean: { type: Bool },\n    integer: { type: Int32 },\n    float: { type: Float64 },\n    another_class: { type: AnotherClass }\n  })\n\n  class AnotherClass\n\n    JSON.mapping({\n      arr: { type: Array(Int32) },\n      hello: { type: String }\n    })\n\n  end\nend\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatzon%2Fjson-to-crystal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatzon%2Fjson-to-crystal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatzon%2Fjson-to-crystal/lists"}