Helper functions for deserializing responses into models
Summary
Functions
Update the provided model with a deserialization of a nested value.
Functions
@spec deserialize( struct(), atom(), :date | :datetime | :list | :map | :struct, module() | nil ) :: struct()
Update the provided model with a deserialization of a nested value.
Parameters
model(struct) - The model to be updatedfield(atom) - The field to be updatedfield_type(atom) - The type of the field to be updateddecoder(module) - The model module whosedecode/1builds the nested value, ornilfor:dateand:datetimefields
Returns
Struct