Module: JIJI::Util::JsonSupport

Included in:
Agent::Property
Defined in:
lib/jiji/util/util.rb

Instance Method Summary collapse

Instance Method Details

#to_jsonObject



85
86
87
88
89
90
91
92
# File 'lib/jiji/util/util.rb', line 85

def to_json
  buff = "{"
  instance_variables.each { |name|
    buff << "#{name[1..-1].to_json}:#{instance_variable_get(name).to_json},"
  }
  buff.chop!
  buff << "}"
end