Sha256: 562efc4dab7f5e93f09f07d7299798e9323574b12cfec3343c2c0a6b92042dd8

Contents?: true

Size: 402 Bytes

Versions: 34

Compression:

Stored size: 402 Bytes

Contents

require '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

34 entries across 34 versions & 2 rubygems

Version Path
plyom_user-0.3.1 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.3.0 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.9 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.8 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.7 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.6 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.5 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.4 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.3 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.2 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.1 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.2.0 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.1.9 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
multi_json-1.8.3 lib/multi_json/adapters/gson.rb
plyom_user-0.1.8 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.1.7 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.1.6 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.1.5 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.1.4 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb
plyom_user-0.1.3 vendor/bundle/ruby/2.0.0/gems/multi_json-1.8.2/lib/multi_json/adapters/gson.rb