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: the client](/docs/v1/install).
  
  Here is an example on how to configure RailsEventStore to serialize
  events' `data` and `metadata` using `JSON`.
  
  ```ruby
  # config/environments/*.rb
  
negative.code: 
  The provided `serializer` must respond to `load` and `dump`.
  
  
  ## Configuring a different mapper
  
  JSON is a popular serialization choice when paired with JSON/JSONB storage on Potgres. To make full use of it, set:
  
  ```ruby
  # config/environments/*.rb
  
  Rails.application.configure do
    config.to_prepare do
      Rails.configuration.event_store = RailsEventStore::Client.new(
        mapper: RubyEventStore::Mappers::JSONMapper.new
      )
    end
  end
  
  ```
  
  Additionally, if you are using Postgres, you can tell 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
  ```
  
  <div class="bg-blue-100 border-l-4 border-blue-500 text-blue-600 px-4" role="alert">
    <p class="text-base font-bold">Bear in mind that <code>JSON</code> will convert symbols to strings and you have to prepare for that when retrieving events.</p>
    <p class="text-base inline-block">
  
  <div class="highlight">
  <pre class="syntax-highlight ruby">
  <code>
  JSON.load(JSON.dump({foo: :bar}))
  => {"foo"=>"bar"}
  </code>
  </pre>
  </div>
  
  One way to approach this is to have your own event adapter, specific for the project you're working on.
  
  <div class="highlight">
  <pre class="syntax-highlight ruby">
  <code>
  class MyEvent < RailsEventStore::Event
    def data
      ActiveSupport::HashWithIndifferentAccess.new(super)
  