SafeJson.Serialize protocol (fnord v0.9.29)
View SourceProtocol for converting structs to JSON-safe plain maps. Implement this
instead of @derive {Jason.Encoder, ...} to keep the JSON backend as an
internal detail of SafeJson.
Summary
Functions
Returns a plain map (or other JSON-encodable term) representing the struct. The returned value will be recursively sanitized by SafeJson before encoding.
Types
@type t() :: term()
All the types that implement this protocol.