Module: ARI::JSON

Defined in:
lib/ari/json.rb

Class Method Summary collapse

Class Method Details

.dump(*args) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/ari/json.rb', line 6

def self.dump(*args)
  if MultiJson.respond_to?(:dump)
    MultiJson.dump(*args)
  else
    MultiJson.encode(*args)
  end
end

.load(*args) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/ari/json.rb', line 14

def self.load(*args)
  if MultiJson.respond_to?(:load)
    MultiJson.load(*args)
  else
    MultiJson.decode(*args)
  end
end