Sha256: 8b847e2f8dde0886338c094b61ca53e96c97cbf65f4783e748f8d3a0a07a6017

Contents?: true

Size: 340 Bytes

Versions: 33

Compression:

Stored size: 340 Bytes

Contents

module ZendeskAPI::Server
  class ZlibJSON < Hash
    class << self
      def demongoize(serialized_object)
        MultiJson.load(Zlib.inflate(serialized_object.to_s), :symbolize_keys => true)
      end

      def mongoize(input_hash)
        Moped::BSON::Binary.new(:generic, Zlib.deflate(input_hash.to_json))
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
zendesk_api-1.2.10 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.9 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.8 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.5 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.7 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.4 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.2 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.1 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.0 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.0.rc3 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.6 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.0.rc2 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.3.0.rc1 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.5 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.4 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.3 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.2 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.2.1 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.1.3 lib/zendesk_api/server/models/zlib_json.rb
zendesk_api-1.1.2 lib/zendesk_api/server/models/zlib_json.rb