anchor.diff:  By default RailsEventStore will use `YAML` as a
   serialization format. The reason is that `YAML` is available out of box
   and can serialize and deserialize data types which are not easily
  -handled in other formats. As an example, `JSON` cannot out of box handle
  -deserializing dates. You get back `String` instead of a `Date`.
  +handled in other formats. 
   
   However, if you don't like `YAML` or you have different needs you can
  -choose to use different serializers (even whole mappers).
  +choose to use different serializers or even replace mappers entirely.
   
   ## Configuring a different serializer
   
  
positive.code: # => "bar"
  ```
  
  Another way to achive that could be define your own [custom mapper & transformation](/docs/mapping_serialization/#custom-mapper).
  
  Additionally, if you are using Postgres, you can configure the migration
  to use JSON or JSONB data types for the `data` and `metadata` fields by
  passing in a `--data-type` to the generator
  
  ```console
  $ rails generate rails_event_store_active_record:migration --data-type=jsonb
  ```
  
  ## Configuring a different mapper
  
  Configuring a different mapper makes it possible to define events however you want and store in them in the database.
  You no longer need to use `RubyEventStore::Event` (or `RailsEventStore::Event`) for events.
  Any object can be used as events, provided you tell us how to map it to columns that we store in the DB.
  
  ### Available mappers
  
  
negative.code:   config.to_prepare do
      Rails.configuration.event_store = RailsEventStore::Client.new(
        mapper: RubyEventStore::Mappers::Default.new(
          serializer: Marshal
        )
      )
    end
  