Class: XToJson::Engines::Yajl
- Inherits:
-
Object
- Object
- XToJson::Engines::Yajl
- Defined in:
- lib/x_to_json/engines/yajl.rb
Class Method Summary collapse
Class Method Details
.decode(string, options = {}) ⇒ Object
6 7 8 |
# File 'lib/x_to_json/engines/yajl.rb', line 6 def self.decode(string, = {}) ::Yajl::Parser.new(:symbolize_keys => [:symbolize_keys]).parse(string) end |
.encode(object) ⇒ Object
10 11 12 |
# File 'lib/x_to_json/engines/yajl.rb', line 10 def self.encode(object) ::Yajl::Encoder.new.encode(object) end |