Class: XToJson::Engines::JsonGem
- Inherits:
-
Object
- Object
- XToJson::Engines::JsonGem
- Defined in:
- lib/x_to_json/engines/json_gem.rb
Class Method Summary collapse
Class Method Details
.decode(string, options = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/x_to_json/engines/json_gem.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_gem.rb', line 12 def self.encode(object) object.to_json end |