MCPcopy Create free account
hub / github.com/DataDog/jsonapi / MarshalJSONAPI

Function MarshalJSONAPI

marshal.go:47–52  ·  view source on GitHub ↗

MarshalJSONAPI includes the given meta (must be a map or struct) as Document.JSONAPI.Meta when marshaling. This also enables writing Document.JSONAPI.Version.

(meta any)

Source from the content-addressed store, hash-verified

45// MarshalJSONAPI includes the given meta (must be a map or struct) as Document.JSONAPI.Meta when marshaling.
46// This also enables writing Document.JSONAPI.Version.
47func MarshalJSONAPI(meta any) MarshalOption {
48 return func(m *Marshaler) {
49 m.includeJSONAPI = true
50 m.jsonAPImeta = meta
51 }
52}
53
54// MarshallCheckUniqueness enables checking for unique resources during marshaling.
55func MarshallCheckUniqueness() MarshalOption {

Callers 3

jsonapi_test.goFile · 0.85
TestMarshalJSONAPIFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestMarshalJSONAPIFunction · 0.68