Paste a JSON API response and instantly get the Go struct you need to unmarshal it in your code.
Pipe a JSON config file through the Node.js CLI version to generate Go types as part of a build script.
Convert a JSON array of objects into the correct Go slice and nested struct types in one step.
| mholt/json-to-go | francisrstokes/super-expressive | paulmillr/encrypted-dns | |
|---|---|---|---|
| Stars | 4,622 | 4,621 | 4,621 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 1/5 | 2/5 | 1/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
JSON-to-Go is a small browser-based tool that takes a JSON snippet you paste in and converts it into a Go type definition automatically. JSON is a common data format used by APIs, and Go is a programming language that requires you to define the shape of your data before you can work with it. Writing those type definitions by hand is tedious, so this tool does it for you in the browser without any setup or account needed. You paste your JSON on one side and the corresponding Go struct appears on the other side instantly. The tool makes reasonable guesses about types when the JSON is ambiguous, so it recommends giving the output a quick look before using it in your code. For arrays of objects, it assumes the first item in the array is representative of all the others. It can also be run from the command line using Node.js if you prefer to pipe JSON files through it as part of a script or workflow. A companion tool called curl-to-Go handles converting curl commands into Go code, and comes from the same author. The README is brief, and the project is intentionally simple in scope.
A browser tool that instantly converts a JSON snippet into a ready-to-use Go struct type definition, saving you from writing the boilerplate code by hand.
Mainly JavaScript. The stack also includes JavaScript, Node.js.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.