Home > DeveloperSection > Forums > Can Json.Net handle a List<object>?
Royce Roy
Royce Roy

Total Post:149

Posted on    January-28-2014 11:54 PM

 C# C# 

 1 Reply(s)
 1807  View(s)
Rate this:

List<User> list = LoadUsers();

JObject json = new JObject();

json["users"] = new JValue(list);

Doesn't seem to be working?


Could not determine JSON object type for type System.Collections.Generic.List

Pravesh Singh

Total Post:412

Posted on    January-29-2014 12:51 AM

Hi Royce,

This might help:

json["users"] = new JValue(JsonConvert.SerializeObject(list));

Don't want to miss updates? Please click the below button!

Follow MindStick