0

How can I deserialize Jobject to a List ? I'm receiving a JSON from kendo-ui toolbar button "create", and I can't control the dispatch of the data. I can only set the format. Now I've got JSON type set.

create: 
{
    url: crudServiceBaseUrl + "CreateContacts",
    type: "POST",
    dataType: "json"  
}

in my c# controller I tried to receive json as a string but failed.

[HttpPost]
public HttpResponseMessage CreateContacts(JObject jobject)
{
}

If I set parameters as Jobject I get data but I don't know how to deserialize it to a List. I tried to create a class with same fields as in the json, but I get null when make deserialize. What can be done here? THX!

enter image description here

Shakir Ahamed
  • 1,290
  • 3
  • 16
  • 39
Dmitriy Klyushin
  • 449
  • 1
  • 4
  • 22

0 Answers0