Module: JunglePath::Json

Defined in:
lib/jungle_path/json.rb,
lib/jungle_path/json/base.rb

Class Method Summary collapse

Class Method Details

.default_options=(option_hash) ⇒ Object



7
8
9
# File 'lib/jungle_path/json/base.rb', line 7

def self.default_options=(option_hash)
  Oj.default_options = 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, options={})
  Oj.dump object, options
end

.hiObject



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, options={})
  Oj.load(json_string, options)
end

.parse(json_string, options = {}) ⇒ Object



21
22
23
# File 'lib/jungle_path/json/base.rb', line 21

def self.parse(json_string, options={})
  load(json_string, options)
end