Sha256: 5c8315babdc1f358f5ecf8ac8e93dadf218134d4934183f6f9e5a8a8d56f1da5
Contents?: true
Size: 496 Bytes
Versions: 71
Compression:
Stored size: 496 Bytes
Contents
require 'json' unless defined?(::JSON) module MultiJson module Engines # Use the JSON gem to encode/decode. class JsonGem ParseError = ::JSON::ParserError def self.decode(string, options = {}) #:nodoc: opts = {} opts[:symbolize_names] = options[:symbolize_keys] string = string.read if string.respond_to?(:read) ::JSON.parse(string, opts) end def self.encode(object) #:nodoc: object.to_json end end end end
Version data entries
71 entries across 71 versions & 4 rubygems