Module: RestGraph::Json
- Defined in:
- lib/rest-graph/core.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(mod) ⇒ Object
141 142 143 |
# File 'lib/rest-graph/core.rb', line 141 def self.extended mod mod.const_set(:ParseError, JSON::ParserError) end |
Instance Method Details
#json_decode(json) ⇒ Object
147 148 149 |
# File 'lib/rest-graph/core.rb', line 147 def json_decode json JSON.parse(json) end |
#json_encode(hash) ⇒ Object
144 145 146 |
# File 'lib/rest-graph/core.rb', line 144 def json_encode hash JSON.dump(hash) end |