Module: EventRouter::Serializer
- Defined in:
- lib/event_router/serializer.rb
Constant Summary collapse
- ADAPTERS =
{ json: { adapter_class: 'EventRouter::Serializers::Json', path: 'serializers/json' }, oj: { adapter_class: 'EventRouter::Serializers::Oj', path: 'serializers/oj' } }.freeze
Class Method Summary collapse
Class Method Details
.deserialize(payload, adapter:) ⇒ Object
16 17 18 |
# File 'lib/event_router/serializer.rb', line 16 def deserialize(payload, adapter:) serializer_adapter(adapter).deserialize(payload) end |
.serialize(payload, adapter:) ⇒ Object
12 13 14 |
# File 'lib/event_router/serializer.rb', line 12 def serialize(payload, adapter:) serializer_adapter(adapter).serialize(payload) end |