MCPcopy Create free account
hub / github.com/go-json-experiment/json / Example_omitFields

Function Example_omitFields

example_test.go:148–270  ·  view source on GitHub ↗

Go struct fields can be omitted from the output depending on either the input Go value or the output JSON encoding of the value. The "omitzero" option omits a field if it is the zero Go value or implements a "IsZero() bool" method that reports true. The "omitempty" option omits a field if it encodes

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

MarshalFunction · 0.92
IndentMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…