class Synapse::Serialization::OjSerializer

Implementation of a serializer that uses the Optimized JSON (Oj) marshaling library

Attributes

deserialize_options[RW]

@return [Hash] Options that will be passed to the Oj load method

serialize_options[RW]

@return [Hash] Options that will be passed to the Oj dump method

Protected Instance Methods

native_content_type() click to toggle source

@return [Class]

# File lib/synapse/serialization/serializer/oj.rb, line 29
def native_content_type
  String
end
perform_deserialize(content, type) click to toggle source

@param [Object] content @param [Class] type @return [Object]

# File lib/synapse/serialization/serializer/oj.rb, line 24
def perform_deserialize(content, type)
  Oj.load content, @deserialize_options
end
perform_serialize(content) click to toggle source

@param [Object] content @return [Object]

# File lib/synapse/serialization/serializer/oj.rb, line 17
def perform_serialize(content)
  Oj.dump content, @serialize_options
end