Resty v0.4.0 Resty.Serializer.Json View Source

Serialize and deserialize resources structs from and to json. This is the default Resty.Serializer implementation.

Link to this section Summary

Functions

Decode the given json and only allow the given known_attributes in the final output

Encode the given map to json and only allow the given known_attributes in the final output. Also if root is present add the encoded map into a root node named after the value found in root

Link to this section Functions

Link to this function decode(json, known_attributes) View Source

Decode the given json and only allow the given known_attributes in the final output.

Link to this function encode(map, known_attributes, root \\ false) View Source

Encode the given map to json and only allow the given known_attributes in the final output. Also if root is present add the encoded map into a root node named after the value found in root.