You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***deserialize** (optional): Describes the function which should be used to deserialize a related property which is not included in the JSON:API document. It should be:
55
55
* A _function_ with one argument `function(data) { ... }`which defines the format to which a relation should be deserialized. By default, the ID of the related object is returned, which would be equal to `function(data) {return data.id}`. See [issue #65](https://github.com/danivek/json-api-serializer/issues/65).
56
56
***convertCase** (optional): Case conversion for serializing data. Value can be : `kebab-case`, `snake_case`, `camelCase`
57
+
***beforeSerialize** (optional): A _function_ with one argument `beforeSerialize(data) => newData` to transform data before serialization.
57
58
58
59
**Deserialization options:**
59
60
60
61
***unconvertCase** (optional): Case conversion for deserializing data. Value can be : `kebab-case`, `snake_case`, `camelCase`
61
62
***blacklistOnDeserialize** (optional): An array of blacklisted attributes. Default = [].
62
63
***whitelistOnDeserialize** (optional): An array of whitelisted attributes. Default = [].
64
+
***afterDeserialize** (optional): A _function_ with one argument `afterDeserialize(data) => newData` to transform data after deserialization.
0 commit comments