Sha256: e4e8cd90b1a3a84765ac4f409d36806fb5914c040228d2f873e60339af5abb70
Contents?: true
Size: 566 Bytes
Versions: 15
Compression:
Stored size: 566 Bytes
Contents
# frozen_string_literal: true module Karafka # Module for all supported by default deserializers. module Deserializers # Default Karafka Json deserializer for loading JSON data in payload. class Payload # @param message [Karafka::Messages::Message] Message object that we want to deserialize # @return [Hash] hash with deserialized JSON data def call(message) # nil payload can be present for example for tombstone messages message.raw_payload.nil? ? nil : ::JSON.parse(message.raw_payload) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems