{"id":15690538,"url":"https://github.com/geopjr/shipwreck","last_synced_at":"2025-10-13T23:42:54.160Z","repository":{"id":37034992,"uuid":"416942051","full_name":"GeopJr/Shipwreck","owner":"GeopJr","description":"Automatically create Crystal JSON mappings from input","archived":false,"fork":false,"pushed_at":"2023-06-06T02:28:29.000Z","size":790,"stargazers_count":8,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T23:43:37.796Z","etag":null,"topics":["crystal","generator","json","svelte"],"latest_commit_sha":null,"homepage":"https://shipwreck.geopjr.dev/","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/GeopJr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"GeopJr","custom":["https://www.paypal.me/GeopJr","https://geopjr.dev/donate"]}},"created_at":"2021-10-14T00:46:41.000Z","updated_at":"2023-08-20T18:09:57.000Z","dependencies_parsed_at":"2024-10-23T22:59:16.256Z","dependency_job_id":"a32a3417-1274-4c6a-ba8d-b94c5d2e9cb0","html_url":"https://github.com/GeopJr/Shipwreck","commit_stats":{"total_commits":179,"total_committers":3,"mean_commits":"59.666666666666664","dds":0.07262569832402233,"last_synced_commit":"1afbc221e5ff8c25807a83fe099d48871e1eeb80"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeopJr%2FShipwreck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeopJr%2FShipwreck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeopJr%2FShipwreck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeopJr%2FShipwreck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeopJr","download_url":"https://codeload.github.com/GeopJr/Shipwreck/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252973617,"owners_count":21834105,"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":["crystal","generator","json","svelte"],"created_at":"2024-10-03T18:11:23.865Z","updated_at":"2025-10-13T23:42:49.125Z","avatar_url":"https://github.com/GeopJr.png","language":"JavaScript","funding_links":["https://github.com/sponsors/GeopJr","https://www.paypal.me/GeopJr","https://geopjr.dev/donate"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"256\" alt=\"shipwreck logo\" src=\"./static/favicon.svg\" /\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eShipwreck\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eAutomatically create Crystal JSON mappings from input\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n  \u003cbr /\u003e\n    \u003ca href=\"https://github.com/GeopJr/Shipwreck/blob/main/CODE_OF_CONDUCT.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/Contributor%20Covenant-v2.1-11fff6.svg?style=for-the-badge\u0026labelColor=000000\" alt=\"Code Of Conduct\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n#\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/Ci8ZpkZ.png\" alt=\"screenshot of the shipwreck page\" width=\"768\" /\u003e\n\u003c/p\u003e\n\n#\n\n## Use\n\n- Go to https://shipwreck.geopjr.dev/\n- Input your (complex or not) JSON in the textarea labeled as \"Input\"\n- Copy the generated Crystal code from the textarea labeled as \"Output\"\n- (Optional) Test the output on carc.in by clicking the button labelled as such\n\n#\n\n## Warnings\n\n- By clicking the button labelled as \"Run on carc.in\" you are sending the input to it. Please redact any sensitive information before doing so.\n- JSONs with array as root won't work as it's outside the scope of this tool.\n- Nothing is nullable by default.\n- All Ints and Floats are 64 bit by default.\n- Keys that are not valid Crystal variables (eg. starting with `-` or a number) will get assigned a random name.\n\n#\n\n## Optimization\n\nOptiomization recursively removes unnecessary structs untill there's nothing else to do. While this makes the output smaller, it also makes the structs unmaintainable.\n\nEg. The following JSON...\n\n```json\n{ \"person\": { \"name\": \"Ciel\", \"height\": 154.52 }, \"cat\": { \"name\": \"Sakamoto\", \"height\": 0.25 } }\n```\n\n...would generate two structs, one for the `person` and one for the `cat`. But with optimization on, they will use the same struct since their keys \u0026 the types of their values are the same. But if the `person` gets a `weight` key but `cat` doesn't, a new struct just for the `person` needs to get generated. Having two seperate structs, in this case, would make adding a key easy.\n\nWhile the above example uses a simple JSON, Shipwreck should be able to handle complex \u0026 nested objects (even if inside arrays!).\n\n#\n\n## Contributing\n\n1. Read the [Code of Conduct](https://github.com/GeopJr/Shipwreck/blob/main/CODE_OF_CONDUCT.md)\n2. Fork it ( https://github.com/GeopJr/Shipwreck/fork )\n3. Create your feature branch (git checkout -b my-new-feature)\n4. Commit your changes (git commit -am 'Add some feature')\n5. Push to the branch (git push origin my-new-feature)\n6. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeopjr%2Fshipwreck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeopjr%2Fshipwreck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeopjr%2Fshipwreck/lists"}