Class: Karafka::Deserializers::Payload
- Inherits:
-
Object
- Object
- Karafka::Deserializers::Payload
- Defined in:
- lib/karafka/deserializers/payload.rb
Overview
Default Karafka Json deserializer for loading JSON data in payload.
Instance Method Summary collapse
-
#call(message) ⇒ Hash
Hash with deserialized JSON data.
Instance Method Details
#call(message) ⇒ Hash
Returns hash with deserialized JSON data.
10 11 12 13 |
# File 'lib/karafka/deserializers/payload.rb', line 10 def call() # nil payload can be present for example for tombstone messages .raw_payload.nil? ? nil : ::JSON.parse(.raw_payload) end |