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)
| 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. |
| 47 | func 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. |
| 55 | func MarshallCheckUniqueness() MarshalOption { |
no outgoing calls