A serializer that uses the JSON format and Jason library.
Summary
Functions
Deserialize given JSON binary data to the expected type.
Whether the configured Decree.EventStore.TypeProvider can build the type, as
deserialize/2 asks it to. Used by the event store as its serializer's
Decree.Store.Serializer.known_type?/1.
Serialize given term to JSON binary data.
Functions
Deserialize given JSON binary data to the expected type.
Whether the configured Decree.EventStore.TypeProvider can build the type, as
deserialize/2 asks it to. Used by the event store as its serializer's
Decree.Store.Serializer.known_type?/1.
Answers false, so the event holds, when the provider cannot map the type name: when it
raises ArgumentError (the default provider, for a name that is no existing atom),
UndefinedFunctionError (a name that is no struct module) or a FunctionClauseError
from the provider's own to_struct/1 (a custom provider with clauses only for the names
it knows, meeting a newer one). Any other exception the provider raises, including a
FunctionClauseError from a function it calls, is a crash, not an unknown type, and is
raised.
Serialize given term to JSON binary data.