List<User> list = LoadUsers();
JObject json = new JObject();
json["users"] = new JValue(list);
Doesn't seem to be working?
Error:
Could not determine JSON object type for type System.Collections.Generic.List
Home / DeveloperSection / Forums / Can Json.Net handle a List<object>?
List<User> list = LoadUsers();
JObject json = new JObject();
json["users"] = new JValue(list);
Doesn't seem to be working?
Error:
Could not determine JSON object type for type System.Collections.Generic.List
Pravesh Singh
29-Jan-2014This might help:
json["users"] = new JValue(JsonConvert.SerializeObject(list));