${REST_SupplyCenter_Title}
${REST_SupplyCenter_Description}
/// <summary>${REST_SupplyCenter_method_fromJson_D}</summary> /// <returns>${REST_SupplyCenter_method_fromJson_return}</returns> /// <param name="json">${REST_SupplyCenter_method_fromJson_param_jsonObject}</param> internal static SupplyCenter FromJson(JsonObject json) { if (json == null) return null; SupplyCenter result = new SupplyCenter(); result.MaxWeight = json["maxWeight"].GetNumberEx(); result.NodeID = (int)json["nodeID"].GetNumberEx(); result.ResourceValue = json["resourceValue"].GetNumberEx(); result.Type = (SupplyCenterType)Enum.Parse(typeof(SupplyCenterType), json["type"].GetStringEx(), true); return result; }
internal static string ToJson(SupplyCenter param) { if (param == null) return null; string json = "{"; List<string> list = new List<string>(); list.Add(string.Format("\"maxWeight\":{0}", param.MaxWeight)); list.Add(string.Format("\"nodeID\":{0}", param.NodeID)); list.Add(string.Format("\"resourceValue\":{0}", param.ResourceValue)); list.Add(string.Format("\"type\":{0}", param.Type.ToString())); json += string.Join(",", list.ToArray()); json += "}"; return json; }