Your JSON data does not match your C# model.
So you need to drop the unnecessary "scab"
property and your data should look like this:
{
"url" : "http://money.cnn.com/2013/12/18/news/companies/target-credit-card/index.html?iid=Lead",
"title" : "Target: 40 million credit cards compromised",
"description" : "The Secret Service is investigating a reported credit card data breach at discount retailer Target.",
"image" : {
"height" : 367,
"width" : 620,
"url" : "http://i2.cdn.turner.com/money/dam/assets/131128213407-black-friday-target-pa-620xa.jpg"
},
"category" : null
}
Or if you cannot change the client side modify your C# action code to:
public void Post(SaveScabModel scabModel) {
store.scabRepository.save(scabModel);
store.commit();
}
Where SaveScabModel
just wraps the Scab
model to have the "extra" scab also on the c# side:
public class SaveScabModel {
public Scab Scab { get; set; }
}