MCPcopy Index your code
hub / github.com/DataDog/jsonapi / MarshalType

Interface MarshalType

jsonapi.go:396–398  ·  view source on GitHub ↗

MarshalType can be optionally implemented to control marshaling of the type field. The order of operations for marshaling the type field is: 1. Use MarshalType if it is implemented 2. Use the value from the jsonapi tag on the primary field 3. Fail

Source from the content-addressed store, hash-verified

394// 2. Use the value from the jsonapi tag on the primary field
395// 3. Fail
396type MarshalType interface {
397 MarshalType() string
398}
399
400// UnmarshalType can be optionally implemented to control unmarshaling of the type field from a string.
401// Since the type is not typically set as a field on the object, this is an opportunity to return an error

Callers 1

makeResourceObjectMethod · 0.65

Implementers 1

ArticleTypeOverridejsonapi_test.go

Calls

no outgoing calls

Tested by

no test coverage detected