How to receive JSON array? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to receive JSON array?

ASalihovASalihov Posts: 1Member
Help me, please with receiving some JSON array

If i sent request(by Fiddler) with Request Body like this:

[{"name":"Homerius", "tonumber":"155555", "fromnumber":"166666", "text":"&&??!"}, {"name":"Stone", "tonumber":"9654999", "fromnumber":"999666", "text":"h9miii99!"}]

how can I receive it in controller?

I try to do something like this:

[code]public HttpResponseMessage Post(JObject[] smspackage)
List smses = smspackage.ToList();
return Request.CreateResponse(HttpStatusCode.Created, smses);
catch (Exception)

return Request.CreateErrorResponse(HttpStatusCode.ExpectationFailed, "error");
but it dont works...

sorry for my bad english
Sign In or Register to comment.