What JSON tag format is used?
Each field gets a backtick struct tag of the form `json:"field_name"` matching the original JSON key exactly. The Go field itself is PascalCase (required for export so encoding/json can see it). For example, the JSON key user_id becomes UserId int `json:"user_id"` — the wire format stays snake_case while Go code uses idiomatic PascalCase.
How are optional fields handled (pointer vs omitempty)?
The generator emits non-pointer types because that produces the cleanest output. To make a field truly optional, change int to *int (a pointer) — encoding/json then writes null when the pointer is nil. To omit a zero-value field from the marshalled JSON, add ,omitempty to the tag: `json:"name,omitempty"`. Use both together (*string with omitempty) for fields that may be absent in the wire format.
Why is the tool emitting int instead of int64?
JSON numbers within the int range are emitted as int because that is the most common Go choice and works on both 32-bit and 64-bit platforms (Go widens int automatically on 64-bit). For high-precision IDs (Twitter snowflake, Stripe IDs) change to int64 manually — encoding/json maps JSON numbers to int64 without precision loss up to 2^53.
How do I unmarshal the generated struct?
var root Root; err := json.Unmarshal(data, &root) — that is everything encoding/json needs once exported PascalCase fields and json tags are present. To stream from an io.Reader use json.NewDecoder(r).Decode(&root). Wrap unknown fields with json.RawMessage if you want to defer typed parsing.
How are JSON arrays mapped?
Arrays of objects become []ClassName slices using a generated nested struct. Arrays of strings become []string, arrays of mixed primitives become []interface{}. encoding/json handles slices natively — no extra setup.
How are nested JSON objects modelled?
Each nested object becomes its own top-level Go struct so you can split them across files in the same package. The parent struct holds the nested type by value (Address Address `json:"address"`) — change to *Address to make it nullable on the wire.
How are JSON keys with dashes or reserved Go words handled?
A JSON key like "user-id" is converted to UserId in the Go struct and the original key is preserved in the json tag. Reserved Go words are not actually reserved as exported field names (you can have a field called Type or Range) so no renaming is needed for the field — only the tag needs to match the JSON.
Is the JSON uploaded to your servers?
No. Conversion runs entirely in your browser via JavaScript. Open DevTools → Network and click Convert — no requests are made. JSON containing API keys, internal field names, or PII never leaves your machine.