# `Trogon.Commanded.EventStore.ProtobufJsonbSerializer`
[🔗](https://github.com/straw-hat-team/beam-monorepo/blob/trogon_commanded@v1.0.1/apps/trogon_commanded/lib/trogon/commanded/event_store/protobuf_jsonb_serializer.ex#L2)

A JSONB serializer using `Protobuf.JSON`.

## Configuring

To use this serializer, add it to your `config.exs`:

    config :my_app, MyApp.EventStore,
        serializer: Trogon.Commanded.EventStore.ProtobufJsonbSerializer,
        types: EventStore.PostgresTypes

## Aggregate Snapshots

To serialize aggregate snapshots, you need to implement the `Trogon.Commanded.ProtobufMapper` protocol.

# `deserialize`

Convert given map to a `Protobuf` struct.

# `serialize`

Convert given `Protobuf` struct to a map.

---

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