# `Decree.Serialization.JsonSerializer`
[🔗](https://github.com/sparkle-space/decree/blob/v0.1.0/lib/decree/serialization/json_serializer.ex#L2)

A serializer that uses the JSON format and Jason library.

# `deserialize`

Deserialize given JSON binary data to the expected type.

# `known_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
`c: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`

Serialize given term to JSON binary data.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
