Module: DataBindings::Adapters::JSON

Includes:
Ruby, GemRequirement
Defined in:
lib/data_bindings/adapters/json.rb

Defined Under Namespace

Modules: Convert

Instance Method Summary collapse

Methods included from GemRequirement

gentle_require_gem, included

Methods included from Ruby

#from_ruby, #from_ruby_array, #from_ruby_hash

Instance Method Details

#from_json(str) ⇒ RubyObjectAdapter, RubyArrayAdapter

Constructs a wrapped object from a JSON string

Parameters:

  • str (String)

    The JSON object

Returns:



10
11
12
# File 'lib/data_bindings/adapters/json.rb', line 10

def from_json(str)
  from_ruby(MultiJson.decode(str))
end