Sha256: b91d37e94b1e16713c1806806f6d4aa8ab7445f4f04646b5c231ebf97cef693e
Contents?: true
Size: 772 Bytes
Versions: 14
Compression:
Stored size: 772 Bytes
Contents
module Clever # Helpers for handling JSON responses module JSON if MultiJson.respond_to? :dump # Dump as a JSON string # @api private # @return [String] def self.dump(*args) MultiJson.dump(*args) end # Load a JSON string to an object # @api private # @return [Object] def self.load(*args) MultiJson.load(*args, symbolize_keys: true) end else # Dump as a JSON string # @api private # @return [String] def self.dump(*args) MultiJson.encode(*args) end # Load a JSON string to an object # @api private # @return [Object] def self.load(*args) MultiJson.decode(*args, symbolize_keys: true) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems