Sha256: 9864eab5112e58374eba17a15008d005836e1eabe4732dccf3d9b871b27ef7ff

Contents?: true

Size: 378 Bytes

Versions: 19

Compression:

Stored size: 378 Bytes

Contents

require 'multi_json'

# multi_json changed its API at 1.3 and older versions don't have dump/load methods.
# We backport those methods when older versions are detected.
#
unless MultiJson.respond_to?(:dump)
  module MultiJson
    module_function

    def dump(object)
      MultiJson.encode(object)
    end

    def load(string)
      MultiJson.decode(string)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
dumper-1.7.3 lib/dumper/patch.rb
dumper-1.7.2 lib/dumper/patch.rb
dumper-1.7.1 lib/dumper/patch.rb
dumper-1.7.0 lib/dumper/patch.rb
dumper-1.6.1 lib/dumper/patch.rb
dumper-1.6.0 lib/dumper/patch.rb
dumper-1.5.0 lib/dumper/patch.rb
dumper-1.4.5 lib/dumper/patch.rb
dumper-1.4.4 lib/dumper/patch.rb
dumper-1.4.3 lib/dumper/patch.rb
dumper-1.4.2 lib/dumper/patch.rb
dumper-1.4.1 lib/dumper/patch.rb
dumper-1.4.0 lib/dumper/patch.rb
dumper-1.3.7 lib/dumper/patch.rb
dumper-1.3.6 lib/dumper/patch.rb
dumper-1.3.5 lib/dumper/patch.rb
dumper-1.3.4 lib/dumper/patch.rb
dumper-1.3.3 lib/dumper/patch.rb
dumper-1.3.2 lib/dumper/patch.rb