{"id":13413263,"url":"https://mholt.github.io/json-to-go/","last_synced_at":"2025-03-14T19:31:49.078Z","repository":{"id":13424126,"uuid":"16112842","full_name":"mholt/json-to-go","owner":"mholt","description":"Translates JSON into a Go type in your browser instantly (original)","archived":false,"fork":false,"pushed_at":"2024-07-31T15:59:24.000Z","size":409,"stargazers_count":4493,"open_issues_count":18,"forks_count":473,"subscribers_count":55,"default_branch":"master","last_synced_at":"2024-10-29T15:05:03.443Z","etag":null,"topics":["go","golang","json","translates-json"],"latest_commit_sha":null,"homepage":"https://mholt.github.io/json-to-go/","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/mholt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["mholt"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-01-21T18:11:13.000Z","updated_at":"2024-10-25T20:43:52.000Z","dependencies_parsed_at":"2023-01-13T17:27:46.619Z","dependency_job_id":"302b1a06-40fa-46ae-907f-5c284284fe16","html_url":"https://github.com/mholt/json-to-go","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/mholt%2Fjson-to-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mholt%2Fjson-to-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mholt%2Fjson-to-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mholt%2Fjson-to-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mholt","download_url":"https://codeload.github.com/mholt/json-to-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243635337,"owners_count":20322923,"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":["go","golang","json","translates-json"],"created_at":"2024-07-30T20:01:36.380Z","updated_at":"2025-03-14T19:31:49.055Z","avatar_url":"https://github.com/mholt.png","language":"JavaScript","funding_links":["https://github.com/sponsors/mholt"],"categories":["JSON","Go","[](https://github.com/golang/go/wiki/CodeTools#code-generation-templating-and-generics)Code generation, Templating and Generics","GoLang","Go Tools"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","Advanced Console UIs","NETCONF","[](https://github.com/golang/go/wiki/CodeTools#tools)Tools","SQL 查询语句构建库","Routers"],"readme":"[\u003cimg src=\"https://mholt.github.io/json-to-go/resources/images/json-to-go.png\" alt=\"JSON-to-Go converts JSON to a Go struct\"\u003e\u003c/a\u003e](https://mholt.github.io/json-to-go)\n\nTranslates JSON into a Go type definition. [Check it out!](http://mholt.github.io/json-to-go)\n\nThis is a sister tool to [curl-to-Go](https://mholt.github.io/curl-to-go), which converts curl commands to Go code.\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 `go 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-go.js sample.json\n  ```\n\n- Read JSON file from stdin:\n\n  ```sh\n  node json-to-go.js \u003c sample.json\n  cat sample.json | node json-to-go.js\n  ```\n\n### Credits\n\nJSON-to-Go is brought to you by Matt Holt ([mholt6](https://twitter.com/mholt6)).\n\nThe Go Gopher is originally by Renee French. This artwork is an adaptation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/mholt.github.io%2Fjson-to-go%2F","html_url":"https://awesome.ecosyste.ms/projects/mholt.github.io%2Fjson-to-go%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/mholt.github.io%2Fjson-to-go%2F/lists"}