require 'hat/middleware' require 'json' module Hat module Middlewares module Worker module JSON include Hat::Middleware def call(delivery_info, properties, payload) payload = ::JSON.parse(payload) [delivery_info, properties, payload] end end end end end