Sha256: c847fe1afa808ed4e1a37d4e373545be1e3017b6ac7c4c7014b867c4527fd7d1
Contents?: true
Size: 584 Bytes
Versions: 137
Compression:
Stored size: 584 Bytes
Contents
module MultiJson module Adapters module JsonCommon def load(string, options={}) string = string.read if string.respond_to?(:read) ::JSON.parse(string, :symbolize_names => options[:symbolize_keys]) end def dump(object, options={}) object.to_json(process_options(options)) end protected def process_options(options={}) return options if options.empty? opts = {} opts.merge!(JSON::PRETTY_STATE_PROTOTYPE.to_h) if options.delete(:pretty) opts.merge!(options) end end end end
Version data entries
137 entries across 77 versions & 10 rubygems