Module: PikaQue::Codecs::JSON
Instance Method Summary collapse
Instance Method Details
#content_type ⇒ Object
16 17 18 |
# File 'lib/pika_que/codecs/json.rb', line 16 def content_type 'application/json' end |
#decode(payload) ⇒ Object
12 13 14 |
# File 'lib/pika_que/codecs/json.rb', line 12 def decode(payload) ::JSON.parse(payload, quirks_mode: true) end |
#encode(payload) ⇒ Object
8 9 10 |
# File 'lib/pika_que/codecs/json.rb', line 8 def encode(payload) ::JSON.generate(payload, quirks_mode: true) end |