Sha256: 60da63b08fcebbd5d9304795a5fc33b1fe5aa96ba466596bd37059eff2b6a707
Contents?: true
Size: 609 Bytes
Versions: 67
Compression:
Stored size: 609 Bytes
Contents
require 'multi_json/adapter' require 'multi_json/convertible_hash_keys' require 'multi_json/vendor/okjson' module MultiJson module Adapters class OkJson < Adapter include ConvertibleHashKeys ParseError = ::MultiJson::OkJson::Error def load(string, options={}) string = string.read if string.respond_to?(:read) result = ::MultiJson::OkJson.decode("[#{string}]").first options[:symbolize_keys] ? symbolize_keys(result) : result end def dump(object, options={}) ::MultiJson::OkJson.valenc(stringify_keys(object)) end end end end
Version data entries
67 entries across 65 versions & 10 rubygems