class Mushy::ReadJson
Public Class Methods
details()
click to toggle source
# File lib/mushy/fluxs/read_json.rb, line 7 def self.details { name: 'ReadJson', description: 'Read JSON and output it as an event.', config: { json: { description: 'The JSON contents that will be returned as an event.', type: 'text', value: 'json', }, }, } end
Public Instance Methods
process(event, config)
click to toggle source
# File lib/mushy/fluxs/read_json.rb, line 21 def process event, config return nil unless config[:json].to_s != '' JSON.parse config[:json] end