Yes the ValueProvider works, it's using the JsonKeyValueModel but for what I need it's a bit of an inconvenient way of getting the values - I'm not sure how it deals with hierarchical values yet.
I noticed you said you think the following should work but I've found it doesn't and the string comes back empty:
Have you tried it within the context of an MVC Web API project (i.e. not self-hosted)? If you say it should work then I'll try and post a trimmed down a code example to justify my lofty claim (and most likely highlight what I'm doing wrong!) :-)
LittleClive
Member
91 Points
65 Posts
Re: How do I add a custom ModelBinder?
Feb 20, 2012 09:30 PM|LINK
Thanks for replying again.
Yes the ValueProvider works, it's using the JsonKeyValueModel but for what I need it's a bit of an inconvenient way of getting the values - I'm not sure how it deals with hierarchical values yet.
I noticed you said you think the following should work but I've found it doesn't and the string comes back empty:
Console.WriteLine(actionContext.Request.Content.ReadAsStringAsync().Result);
Have you tried it within the context of an MVC Web API project (i.e. not self-hosted)? If you say it should work then I'll try and post a trimmed down a code example to justify my lofty claim (and most likely highlight what I'm doing wrong!) :-)