Class: MessageQueue::Serializers::Json

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

Instance Method Summary collapse

Methods inherited from Serializer

content_type, dump, load

Instance Method Details

#content_typeObject



14
15
16
# File 'lib/message_queue/serializers/json.rb', line 14

def content_type
  "application/json"
end

#dump(object, options = {}) ⇒ Object



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

def dump(object, options = {})
  ::MultiJson.dump(object, options)
end

#load(string, options = {}) ⇒ Object



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

def load(string, options = {})
  ::MultiJson.load(string, options)
end