Method: Chef::WebUIUser#to_json

Defined in:
lib/chef/webui_user.rb

#to_json(*a) ⇒ Object

Serialize this object as a hash



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/chef/webui_user.rb', line 92

def to_json(*a)
  attributes = Hash.new
  recipes = Array.new
  result = {
    'name' => @name,
    'json_class' => self.class.name,
    'salt' => @salt,
    'password' => @password,
    'openid' => @openid,
    'admin' => @admin,
    'chef_type' => 'webui_user',
  }
  result["_rev"] = @couchdb_rev if @couchdb_rev
  result.to_json(*a)
end