I'm fairly new to Web API and have already created a successful API, but I am now working with different JSON and I don't know how exactly Web API parses JSON so nicely. Before, I had JSON like this:
[
{
"email": "[email protected]",
"timestamp": 1337197600,
"id": "55555",
}
]
And my Web API Method signature was:
[HttpPost]
public HttpResponseMessage Create(List<MyOwnModel> data)
{
...
}
This worked great. I had a list of all of the JSON objects and all of the attributes associated with it. Now I have JSON like this:
randomJsonObjects:
[
{
"email": "[email protected]",
"timestamp": 1337197600,
"id": "55555",
}
]
Well that randomJsonObjects broke it. Now data is null when I hit the API. What am I missing?
datavariable torandomJsonObjects