79613195

Date: 2025-05-08 21:32:27
Score: 1.5
Natty:
Report link

With json v2, you can have this struct

type Foo struct {
  // Known fields
  A int `json:"a"`
  B int `json:"b"`
  // The type may be a jsontext.Value or map[string]T.
  Unknown jsontext.Value `json:",unknown"`
}

Official documentation and example here: https://pkg.go.dev/github.com/go-json-experiment/json#example-package-UnknownMembers

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Ender-events