mholt/json-to-go
mholt/json-to-go has 4,622 GitHub stars and 475 forks. GitHot measured +1 stars in 24 hours and 0 in 7 days. Last checked 2026-11-09 13:28 UTC. Last push 2024-07-31.
Translates JSON into a Go type in your browser instantly (original)
Measured star growth
- in 24h
- +1
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalTranslates JSON into a Go type definition. Check it out!
This is a sister tool to curl-to-Go, which converts curl commands to Go code.
Things to note:
- The script sometimes has to make some assumptions, so give the output a once-over.
- In an array of objects, it is assumed that the first object is representative of the rest of them.
- The output is indented, but not formatted. Use
go fmt!
Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.
Usage
Read JSON file:
node json-to-go.js sample.jsonRead JSON file from stdin:
node json-to-go.js < sample.json cat sample.json | node json-to-go.js
Credits
JSON-to-Go is brought to you by Matt Holt (mholt6).
The Go Gopher is originally by Renee French. This artwork is an adaptation.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,398 starspublic-apis/public-apis
A collective list of free APIs
497,679 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
447,495 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,261 stars