Sha256: 5b401aca24dade61a8aad677dadeaa46ac78ec0ff1c3ae36e6d1a7eb93c74c4e
Contents?: true
Size: 403 Bytes
Versions: 2
Compression:
Stored size: 403 Bytes
Contents
require 'json' unless defined?(::JSON) module MultiJson module Engines # Use the JSON gem to encode/decode. class JsonGem def self.decode(string, options = {}) #:nodoc: opts = {} opts[:symbolize_names] = options[:symbolize_keys] ::JSON.parse(string, opts) end def self.encode(object) #:nodoc: object.to_json end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
multi_json-0.0.4 | lib/multi_json/engines/json_gem.rb |
multi_json-0.0.3 | lib/multi_json/engines/json_gem.rb |