JSON to Go Struct
Infer Go types and JSON tags from an object sample.
Processing stays in your browser. Mixed arrays use interface{}. JSON numbers use float64; check integer requirements and field names against your actual API.
How to use the json to go struct
Infer Go types and JSON tags from an object sample. Complete the sample json, root struct name fields above, or upload a UTF-8 text file for the first field. Choose Run tool, review the output, then copy or download the result.
Example
A name property becomes an exported Name field with a json:"name" tag.
Good to know
Mixed arrays use interface{}. JSON numbers use float64; check integer requirements and field names against your actual API.