Module: JunglePath::Json
- Defined in:
- lib/jungle_path/json.rb,
lib/jungle_path/json/base.rb
Class Method Summary collapse
- .default_options=(option_hash) ⇒ Object
-
.dump(object, options = {}) ⇒ Object
returns a json string.
- .hi ⇒ Object
-
.load(json_string, options = {}) ⇒ Object
returns a Ruby hash.
- .parse(json_string, options = {}) ⇒ Object
Class Method Details
.default_options=(option_hash) ⇒ Object
7 8 9 |
# File 'lib/jungle_path/json/base.rb', line 7 def self.(option_hash) Oj. = option_hash end |
.dump(object, options = {}) ⇒ Object
returns a json string
12 13 14 |
# File 'lib/jungle_path/json/base.rb', line 12 def self.dump(object, ={}) Oj.dump object, end |
.hi ⇒ Object
25 26 27 |
# File 'lib/jungle_path/json/base.rb', line 25 def self.hi puts "hi from jungle_path/json! :)" end |
.load(json_string, options = {}) ⇒ Object
returns a Ruby hash
17 18 19 |
# File 'lib/jungle_path/json/base.rb', line 17 def self.load(json_string, ={}) Oj.load(json_string, ) end |
.parse(json_string, options = {}) ⇒ Object
21 22 23 |
# File 'lib/jungle_path/json/base.rb', line 21 def self.parse(json_string, ={}) load(json_string, ) end |