Class: XToJson::Engines::JsonPure
- Inherits:
-
Object
- Object
- XToJson::Engines::JsonPure
- Defined in:
- lib/x_to_json/engines/json_pure.rb
Class Method Summary collapse
Class Method Details
.decode(string, options = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/x_to_json/engines/json_pure.rb', line 6 def self.decode(string, = {}) opts = {} opts[:symbolize_names] = [:symbolize_keys] ::JSON.parse(string, opts) end |
.encode(object) ⇒ Object
12 13 14 |
# File 'lib/x_to_json/engines/json_pure.rb', line 12 def self.encode(object) object.to_json end |