Sha256: 0b82aa35f1d01d1a56713ee6b8f74364af52e8f44e223a36d0a4e6743cbac8f8

Contents?: true

Size: 336 Bytes

Versions: 9

Compression:

Stored size: 336 Bytes

Contents

require 'json'

module PikaQue
  module Codecs
    module JSON
      extend self

      def encode(payload)
        ::JSON.generate(payload, quirks_mode: true)
      end

      def decode(payload)
        ::JSON.parse(payload, quirks_mode: true)
      end

      def content_type
        'application/json'
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pika_que-0.3.0 lib/pika_que/codecs/json.rb
pika_que-0.2.0 lib/pika_que/codecs/json.rb
pika_que-0.1.6 lib/pika_que/codecs/json.rb
pika_que-0.1.5 lib/pika_que/codecs/json.rb
pika_que-0.1.4 lib/pika_que/codecs/json.rb
pika_que-0.1.3 lib/pika_que/codecs/json.rb
pika_que-0.1.2 lib/pika_que/codecs/json.rb
pika_que-0.1.1 lib/pika_que/codecs/json.rb
pika_que-0.1.0 lib/pika_que/codecs/json.rb