public static JsonIr ListToJSON <T>(List <T> entities_list) where T : ENTITY { if (entities_list == null) { throw new ArgumentNullException(); } JsonIr irList = new JsonIr(typeof(T).Name + "_LIST"); foreach (ENTITY e in entities_list) { irList.AppendChild(e.ToJSON()); } return(irList); }
public JsonIr AppendChild(JsonIr child) { children.Add(child ?? GetIrNull()); return(this); }