Sha256: 81259097e4de13dac6d159abb1f1a76007e30dfaeab9cc91308225aa2d14d88a

Contents?: true

Size: 634 Bytes

Versions: 125

Compression:

Stored size: 634 Bytes

Contents

require 'multi_json/adapter'
require 'multi_json/convertible_hash_keys'
require 'multi_json/vendor/okjson'

module MultiJson
  module Adapters
    class OkJson < Adapter
      include ConvertibleHashKeys
      ParseError = ::MultiJson::OkJson::Error

      def load(string, options = {})
        result = ::MultiJson::OkJson.decode("[#{string}]").first
        options[:symbolize_keys] ? symbolize_keys(result) : result
      rescue ArgumentError # invalid byte sequence in UTF-8
        raise ParseError
      end

      def dump(object, _ = {})
        ::MultiJson::OkJson.valenc(stringify_keys(object))
      end
    end
  end
end

Version data entries

125 entries across 106 versions & 22 rubygems

Version Path
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.9 vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.8 vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/multi_json-1.15.0/lib/multi_json/adapters/ok_json.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/multi_json-1.15.0/lib/multi_json/adapters/ok_json.rb
logstash-output-scalyr-0.1.6 vendor/bundle/jruby/2.5.0/gems/multi_json-1.13.1/lib/multi_json/adapters/ok_json.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/multi_json-1.15.0/lib/multi_json/adapters/ok_json.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/multi_json-1.15.0/lib/multi_json/adapters/ok_json.rb