JSON code generation / Go
Free online JSON to Go struct generator
Generate tagged Go structs from nested telemetry. Open your JSON locally, then inspect and download the generated files.
Privacy-first processing: pasted or opened JSON stays in this browser tab and is not uploaded to our servers.
Recent successful runs
Only settings and opaque source fingerprints stay in this browser. JSON and results are not saved.
Loading local history...
Try the sensor reading example
The editor starts empty. Load this example only if you want a small source to test the generated model.
Static example with expected output
Verified with the local schema-codegen engine.
Telemetry JSON
{
"device": {
"serial_no": "SN-204",
"zone": "west"
},
"temperature": 21.75,
"online": true
}Operation
Generate Go structs with JSON tags.
- Language: Go
- Package: generated
- Serializer: none
- File layout: split files
Expected output excerpt (GeneratedRoot.go)
type GeneratedRoot struct {
Device GeneratedRootDevice `json:"device"`
Online bool `json:"online"`
Temperature float64 `json:"temperature"`
}Caveat: The decimal reading maps to float64 with the default numeric policy.
Before using this output
JSON tags preserve keys, but custom numeric codecs are not generated. Separate files avoid the current single-file import-order limitation.
Generation analyzes the source shape; it does not validate every future input. Review the language, serializer, enum, primitive, and file-layout options before downloading.
Read the Go workflow