Sha256: b05f2a384d10a87872d12c27c57ef48ede0ee9664656e619ce3c5de8e1b89698

Contents?: true

Size: 246 Bytes

Versions: 5

Compression:

Stored size: 246 Bytes

Contents

unless Object.new.respond_to?(:to_json)
  # @private
  class Object
    def to_json(*args)
      Riak::JSON.encode(self)
    end
  end

  # @private
  class Symbol
    def to_json(*args)
      to_s.to_json(*args)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
riak-client-2.4.1 lib/riak/core_ext/json.rb
riak-client-2.4.0 lib/riak/core_ext/json.rb
riak-client-2.4.0.pre1 lib/riak/core_ext/json.rb
riak-client-2.3.2 lib/riak/core_ext/json.rb
riak-client-2.3.1 lib/riak/core_ext/json.rb