Class: Sunstore::Handler::JSON

Inherits:
Object
  • Object
show all
Defined in:
lib/sunstore/handlers/json.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(txt) ⇒ Object



9
10
11
# File 'lib/sunstore/handlers/json.rb', line 9

def deserialize(txt)
  JSON.parse(txt)
end

#serialize(h) ⇒ Object



5
6
7
# File 'lib/sunstore/handlers/json.rb', line 5

def serialize(h)
    h.to_json
end

#typeObject



13
14
15
# File 'lib/sunstore/handlers/json.rb', line 13

def type
  "json"
end