Method: EventQ::SerializationProviders::OjSerializationProvider#deserialize
- Defined in:
- lib/eventq_base/serialization_providers/oj_serialization_provider.rb
#deserialize(json) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/eventq_base/serialization_providers/oj_serialization_provider.rb', line 14 def deserialize(json) begin return Oj.load(json) rescue Oj::ParseError EventQ.log(:debug, "[#{self.class}] - Failed to deserialize using Oj, falling back to JsonSerializationProvider.") return @json_serializer.deserialize(json) end end |