Class: WellRested::JSONFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/well_rested/json_formatter.rb

Instance Method Summary collapse

Instance Method Details

#decode(serialized_representation) ⇒ Object



8
9
10
# File 'lib/well_rested/json_formatter.rb', line 8

def decode(serialized_representation)
  JSON.parse(serialized_representation)
end

#encode(obj) ⇒ Object



4
5
6
# File 'lib/well_rested/json_formatter.rb', line 4

def encode(obj)
  obj.to_json
end