views:

296

answers:

1

Hi,

  List<User> list = LoadUsers();

  JObject json = new JObject();

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

Doesn't seem to be working?

Error: oculd not determin JSON object type for type System.Collections.Generic.List

A: 

This might help:

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