{"id":16487044,"url":"https://github.com/gmlewis/json-to-moonbit","last_synced_at":"2026-05-15T07:34:32.168Z","repository":{"id":254011233,"uuid":"845207160","full_name":"gmlewis/json-to-moonbit","owner":"gmlewis","description":"Translates JSON into MoonBit code in your browser instantly.","archived":false,"fork":false,"pushed_at":"2024-09-21T22:11:06.000Z","size":133,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-07T14:41:38.253Z","etag":null,"topics":["code","json","moonbit"],"latest_commit_sha":null,"homepage":"https://gmlewis.github.io/json-to-moonbit/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmlewis.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-20T19:47:44.000Z","updated_at":"2024-09-23T09:10:14.000Z","dependencies_parsed_at":"2024-08-20T22:18:33.592Z","dependency_job_id":"692cf956-e5de-4879-bdef-562a1729415b","html_url":"https://github.com/gmlewis/json-to-moonbit","commit_stats":null,"previous_names":["gmlewis/json-to-moonbit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gmlewis/json-to-moonbit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fjson-to-moonbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fjson-to-moonbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fjson-to-moonbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fjson-to-moonbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmlewis","download_url":"https://codeload.github.com/gmlewis/json-to-moonbit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmlewis%2Fjson-to-moonbit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33057952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["code","json","moonbit"],"created_at":"2024-10-11T13:32:07.140Z","updated_at":"2026-05-15T07:34:32.151Z","avatar_url":"https://github.com/gmlewis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gmlewis/json-to-moonbit\n\nTranslates JSON into MoonBit code. [Check it out!](http://gmlewis.github.io/json-to-moonbit)\n\nThis is based on Matt Holt's [json-to-go](http://mholt.github.io/json-to-go).\n\nThings to note:\n\n- The script sometimes has to make some assumptions, so give the output a once-over.\n- In an array of objects, it is assumed that the first object is representative of the rest of them.\n- The output is indented, but not formatted. Use `moon fmt`!\n\nContributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.\n\n## Usage\n\n- Read JSON file:\n\n  ```sh\n  node json-to-moonbit.js sample.json\n  # or\n  bun json-to-moonbit.js sample.json\n  ```\n\n- Read JSON file from stdin:\n\n  ```sh\n  node json-to-moonbit.js \u003c sample.json\n  cat sample.json | node json-to-moonbit.js\n  # or\n  bun json-to-moonbit.js \u003c sample.json\n  cat sample.json | bun json-to-moonbit.js\n  ```\n\n## Status\n\nThe code has been updated to support compiler:\n\n```bash\n$ moon version --all\nmoon 0.1.20240920 (13f54ef 2024-09-20) ~/.moon/bin/moon\nmoonc v0.1.20240920+a1bf2bf0d ~/.moon/bin/moonc\nmoonrun 0.1.20240920 (13f54ef 2024-09-20) ~/.moon/bin/moonrun\n```\n\n\n## Credits\n\nJSON-to-Go is brought to you by Matt Holt ([mholt6](https://twitter.com/mholt6)).\n\nJSON-to-MoonBit is brought to you by Glenn Lewis.\n\ndiff is Copyright (c) 2009-2015, Kevin Decker \u003ckpdecker@gmail.com\u003e\nAll rights reserved.\nand is used for testing. It is from: https://github.com/kpdecker/jsdiff/\nwith license: https://github.com/kpdecker/jsdiff/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmlewis%2Fjson-to-moonbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmlewis%2Fjson-to-moonbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmlewis%2Fjson-to-moonbit/lists"}