public override string ToString() { List <string> items = new List <string>(8); // up to 8 items in list items.Add(ID.ToJSONString().ToJSONEntry("_id")); if (IGDB != -1) { items.Add(IGDB.ToJSONString().ToJSONEntry("igdb_id")); } items.Add(Genres.ToJSONString().ToJSONEntry("genres")); items.Add(Name.ToJSONString().ToJSONEntry("name")); items.Add(Slug.ToJSONString().ToJSONEntry("slug")); items.Add(Summary.ToJSONString().ToJSONEntry("summary")); items.Add(CoverURL.ToJSONString().ToJSONEntry("cover")); items.Add(Type.ToJSONString().ToJSONEntry("type")); return(items.TOJSONEntry()); /* * string format = "{{" + * "\"_id\": {0}," + * "\"igdb_id\": {1}," + * "\"genres\": {2}," + * "\"name\": {3}," + * "\"slug\": {4}," + * "\"summary\": {5}," + * "\"cover\": {6}," + * "\"type\": {7}" + * "}}"; * return string.Format(format, * ID.ToJSONString(), * IGDB.ToJSONString(), * Genres.ToJSONString(), * Name.ToJSONString(), * Slug.ToJSONString(), * Summary.ToJSONString(), * CoverURL.ToJSONString(), * Type.ToJSONString()); */ }