Sha256: ee0e197c157b9e3c629b2667253a01e1edf9a135175b504f995d3f203b29c634

Contents?: true

Size: 426 Bytes

Versions: 66

Compression:

Stored size: 426 Bytes

Contents

require 'gson' unless defined?(::Gson)
require 'multi_json/adapter'

module MultiJson
  module Adapters
    # Use the gson.rb library to dump/load.
    class Gson < Adapter
      ParseError = ::Gson::DecodeError

      def load(string, options={})
        ::Gson::Decoder.new(options).decode(string)
      end

      def dump(object, options={})
        ::Gson::Encoder.new(options).encode(object)
      end
    end
  end
end

Version data entries

66 entries across 64 versions & 10 rubygems

Version Path
scout-5.9.13 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.12 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.11 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.10.pre vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.8 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.7.2.pre vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.8.pre vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.7.1 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.7.pre vendor/multi_json/lib/multi_json/adapters/gson.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json/adapters/gson.rb
scout-5.9.5 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.4 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.4.pre vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.3 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.2 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.1 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.1.pre vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.0 vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.9.0.pre vendor/multi_json/lib/multi_json/adapters/gson.rb
scout-5.8.9 vendor/multi_json/lib/multi_json/adapters/gson.rb