public string ToListJson() { return(String.Format("{{Name:\"{0}\", UniqueName:\"{1}\", Description:\"{2}\", Category:{3}, Timeout:{4}, Results:[{5}]}}", Name.EscapeJson(), UniqueName.EscapeJson(), Description.EscapeJson(), Category.ToListJson(), Timeout.MaybeStruct(m => m.ToString(), () => "null"), string.Join(",", Results.Select(it => it.ToListJson()).ToArray()))); }