Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / logstash   deb

Repository URL to install this package:

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={})
        string = string.read if StringIO === string
        ::Gson::Decoder.new(options).decode(string)
      end

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