Module: RestCore::Json::YajlRuby
- Defined in:
- lib/rest-core/util/json.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(mod) ⇒ Object
17 18 19 |
# File 'lib/rest-core/util/json.rb', line 17 def self.extended mod mod.const_set(:ParseError, Yajl::ParseError) end |
Instance Method Details
#decode(json) ⇒ Object
23 24 25 |
# File 'lib/rest-core/util/json.rb', line 23 def decode json Yajl::Parser.parse(json) end |
#encode(hash) ⇒ Object
20 21 22 |
# File 'lib/rest-core/util/json.rb', line 20 def encode hash Yajl::Encoder.encode(hash) end |