Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 28, 2013 04:26 PM by MsdnDev
Feb 27, 2013 11:43 PM|LINK
In all samples and documentation I've read so far the model use by the controller is strongly typed and know at compile time (plugin model). I have a case on which the type is known at runtime and I am wondering if I should define my controller API like:
public async Task<HttpResponseMessage> Post(HttpRequestMessage request)
This model works fine, however I am wondering if I am missing some neat feature of WebAPI.
Feb 28, 2013 09:45 AM|LINK
You can use the ExpandoObject. JSON.NET (the default JSON serializer) works great with ExpandoObjects.
More on ExpandoObjects:
Feb 28, 2013 04:26 PM|LINK
I'll look into that, thanks