Sha256: e7d9a102b46878a3ad8dc827b9a40e6191c8185211f6afba73d4f6a344f36e5b
Contents?: true
Size: 632 Bytes
Versions: 13
Compression:
Stored size: 632 Bytes
Contents
require 'jrjackson_r' unless defined?(::JrJackson) require 'multi_json/adapter' require 'multi_json/convertible_hash_keys' module MultiJson module Adapters class JrJackson < Adapter include ConvertibleHashKeys ParseError = ::Java::OrgCodehausJackson::JsonParseException def load(string, options={}) string = string.read if string.respond_to?(:read) result = ::JrJackson::Json.parse(string) options[:symbolize_keys] ? symbolize_keys(result) : result end def dump(object, options={}) ::JrJackson::Json.generate(stringify_keys(object)) end end end end
Version data entries
13 entries across 13 versions & 5 rubygems