Class: Burner::Library::Deserialize::Json

Inherits:
JobWithRegister show all
Defined in:
lib/burner/library/deserialize/json.rb

Overview

Take a JSON string and deserialize into object(s).

Expected Payload input: string of JSON data. Payload output: anything, as specified by the JSON de-serializer.

Constant Summary

Constants inherited from JobWithRegister

JobWithRegister::BLANK

Instance Attribute Summary

Attributes inherited from JobWithRegister

#register

Attributes inherited from Job

#name

Instance Method Summary collapse

Methods inherited from JobWithRegister

#initialize

Methods inherited from Job

#initialize

Methods included from Util::Arrayable

#array

Constructor Details

This class inherits a constructor from Burner::JobWithRegister

Instance Method Details

#perform(_output, payload) ⇒ Object



18
19
20
# File 'lib/burner/library/deserialize/json.rb', line 18

def perform(_output, payload)
  payload[register] = JSON.parse(payload[register])
end