JSON to Go struct
Generate Go struct definitions with json tags from a sample JSON document.
How to use
- Paste a JSON sample.
- Name the root struct.
- Copy the generated Go code.
What it supports
Objects become nested structs; arrays infer the element type from the merged item shape; null fields become *T. Keys are exported via Go-style names with a json tag for the original key. Input up to 2 MB, nesting to 40 levels.