Class: Freddy::Payload::JsonAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/freddy/payload.rb

Class Method Summary collapse

Class Method Details

.dump(payload) ⇒ Object



41
42
43
# File 'lib/freddy/payload.rb', line 41

def self.dump(payload)
  JSON.dump(payload)
end

.parse(payload) ⇒ Object



35
36
37
38
39
# File 'lib/freddy/payload.rb', line 35

def self.parse(payload)
  # MRI has :symbolize_keys, but JRuby does not. Not adding it at the
  # moment.
  Symbolizer.symbolize(JSON.parse(payload))
end