JSON to Go Struct

Your workspaceProcessed on your device

Leave the pointer blank to use the full document. Use /items or /items/0 to pick a nested value.

A few things to know.

Uses up to 4,194,304 input and output characters, a 4 MiB UTF-8 file, 128 nested levels and 500,000 JSON tokens. Duplicate keys are rejected. Processing stays on this device.

  1. Paste sample JSON, select a UTF-8 file or load the inventory example. Leave Root JSON Pointer blank or select part of the document with a pointer such as /items.
  2. Set a model name and Go package. Choose JSON tags, JSON and DB tags, or no tags. Select how missing or nullable fields become pointers.
  3. Generate Go, check the field mapping and review notes, then download models.go or copy the source.