Module: Jellyfish::Json::Json
- Defined in:
- lib/jellyfish/json.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(mod) ⇒ Object
30 31 32 |
# File 'lib/jellyfish/json.rb', line 30 def self.extended mod mod.const_set(:ParseError, JSON::ParserError) end |
Instance Method Details
#decode(json) ⇒ Object
36 37 38 |
# File 'lib/jellyfish/json.rb', line 36 def decode json JSON.parse(json) end |
#encode(hash) ⇒ Object
33 34 35 |
# File 'lib/jellyfish/json.rb', line 33 def encode hash JSON.dump(hash) end |