Module: DataBindings::Adapters::JSON::Convert

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

Instance Method Summary collapse

Methods included from GemRequirement

gentle_require_gem, included

Methods included from ConverterHelper

included

Instance Method Details

#force_convert_to_jsonString

Creates a String repsentation of a Ruby Hash or Array.

Parameters:

  • generator (Generator)

    The generator that invokes this constructor

  • name (Symbol)

    The name of the binding used on this object

  • obj (Array, Hash)

    The object to be represented in JSON

Returns:

  • (String)

    The JSON representation of this object



24
25
26
# File 'lib/data_bindings/adapters/json.rb', line 24

def force_convert_to_json
  MultiJson.encode(self)
end