Class: EventRouter::Serializers::Oj

Inherits:
Base
  • Object
show all
Defined in:
lib/event_router/serializers/oj.rb

Class Method Summary collapse

Class Method Details

.deserialize(string) ⇒ Object



13
14
15
# File 'lib/event_router/serializers/oj.rb', line 13

def deserialize(string)
  ::Oj.load(string, mode: :object)
end

.serialize(object) ⇒ Object



9
10
11
# File 'lib/event_router/serializers/oj.rb', line 9

def serialize(object)
  ::Oj.dump(object, mode: :object)
end