Class: Juke::Formatters::Json

Inherits:
Object
  • Object
show all
Defined in:
lib/juke/formatters/json.rb

Instance Method Summary collapse

Instance Method Details

#decode(str) ⇒ Object



11
12
13
# File 'lib/juke/formatters/json.rb', line 11

def decode(str)
  ::JSON::parse(str)
end

#encode(obj) ⇒ Object



7
8
9
# File 'lib/juke/formatters/json.rb', line 7

def encode(obj)
  obj.to_json
end