JSON to Go Structure
JSON to Go Structure
JSON to Go Structure is an easy-to-use tool that converts JSON into Go structures. Copy, paste, and convert.
It provides the following tools:
- Generate Go structures online from JSON strings.
- Generate Go models online from JSON strings.
- Generate Go mappings online from JSON strings.
How to use JSON to Go Structure online?
- Enter or paste your JSON string in the text area above.
- Click the "JSON to Go" button to generate your Golang structure code.
- Click the "Copy" button to paste it into your clipboard; you can also download the result file.
JSON to Go Structure Example
Input JSON string:
{
"id":1,
"name":"John",
"age":24
}
Output Go structure result:
type Autogenerated struct {
ID int `json:"id"`
Name string `json:"name"`
Age int `json:"age"`
}