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
| 394 | // 2. Use the value from the jsonapi tag on the primary field |
| 395 | // 3. Fail |
| 396 | type 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 |
no outgoing calls
no test coverage detected