Skip to content
masterclass Buddy

Go · Function

json.Unmarshal

json.Unmarshal parses JSON bytes and stores the result in a Go value. Pass a non-nil pointer to the destination and check the returned error.

Last updated

Syntax

func Unmarshal(data []byte, v any) error

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Marshal
  • Decoder
  • Decoder.Decode
  • Decoder.UseNumber
  • RawMessage
  • Unmarshaler
  • UnmarshalTypeError

Source: json package - encoding/json - Go Packages. Checked 2026-11-03.