Class: Redistry::Serializers::JSON

Inherits:
Object
  • Object
show all
Defined in:
lib/redistry/serializers/json.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(klass, *objs) ⇒ Object



10
11
12
# File 'lib/redistry/serializers/json.rb', line 10

def deserialize(klass, *objs)
  objs.flatten.map { |o| ::JSON.parse(o) }
end

#serialize(klass, *objs) ⇒ Object



6
7
8
# File 'lib/redistry/serializers/json.rb', line 6

def serialize(klass, *objs)
  objs.flatten.map { |o| o.to_json }
end