Sha256: 524f3a2fc44f7be5521ea739e758253ce773b0069240e333edbb2c7bb862d48e
Contents?: true
Size: 499 Bytes
Versions: 71
Compression:
Stored size: 499 Bytes
Contents
require 'json/pure' unless defined?(::JSON) module MultiJson module Engines # Use JSON pure to encode/decode. class JsonPure 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