I tried to search around web, but it looks like my search skills aren't up to the match. Does the WCF Web API (ASP.NET MVC 4) support OData v3 and thus JSON light? And actually, how does one define which version of OData to use in Web API applications? It
doesn't in general look like the same as in WCF Data Services.
I think I'll have a slew of futher questions, but I'd be much delighted if someone could point me to a correct source of information or just share here. Thanks.
ASP.NET Web API today only has very limited OData support. We only support four OData query operators: $top, $skip, $orderby and $filter.
That is also what I found out whilst experimenting [Queryable] operators in ASP.NET MVC 4 project.
This probably should be a separate question, but in order to return the potential customers OData JSON light formatted data, I need to use the WCF Data Services Server 5.1.0-rc1 with the appropriate
additonal libraries like
ODataLib 5.1.0-rc1? As for the background information, the scenario is to to a service that needs to only return data (so, a public query interface) and it should be ready by the end of September with some examples how to use the interface.
It would be beneficial to have it OData JSON light regarding the future, but to get the ball rolling is more important and "plain JSON" as returned by the Web API would work too -- though updating the format to something else wouldn't be an option anymore (without
introducing API versioning).
That is also what I found out whilst experimenting [Queryable] operators in ASP.NET MVC 4 project.
Please note that this functionality will be removed in the RTM version (and is already in the daily builds). Like mentioned, it will be released sometime after RTM as a Nuget package.
Veikko
Member
14 Points
10 Posts
Does Web API support OData v3 and JSON light?
Aug 02, 2012 12:57 PM|LINK
Hi!
I tried to search around web, but it looks like my search skills aren't up to the match. Does the WCF Web API (ASP.NET MVC 4) support OData v3 and thus JSON light? And actually, how does one define which version of OData to use in Web API applications? It doesn't in general look like the same as in WCF Data Services.
I think I'll have a slew of futher questions, but I'd be much delighted if someone could point me to a correct source of information or just share here. Thanks.
MikeWasson
Member
486 Points
78 Posts
Microsoft
Re: Does Web API support OData v3 and JSON light?
Aug 02, 2012 02:09 PM|LINK
Currently Web API does not support OData, although OData support is on the roadmap (post RTM).
Veikko
Member
14 Points
10 Posts
Re: Does Web API support OData v3 and JSON light?
Aug 03, 2012 06:56 AM|LINK
Thanks, Mike!
Your answer confirms what I figured out whilst reading ASP.NET Web Stack Codeplex discussion:
That is also what I found out whilst experimenting [Queryable] operators in ASP.NET MVC 4 project.
This probably should be a separate question, but in order to return the potential customers OData JSON light formatted data, I need to use the WCF Data Services Server 5.1.0-rc1 with the appropriate additonal libraries like ODataLib 5.1.0-rc1? As for the background information, the scenario is to to a service that needs to only return data (so, a public query interface) and it should be ready by the end of September with some examples how to use the interface.
It would be beneficial to have it OData JSON light regarding the future, but to get the ball rolling is more important and "plain JSON" as returned by the Web API would work too -- though updating the format to something else wouldn't be an option anymore (without introducing API versioning).
MartinJ.
Member
243 Points
80 Posts
Re: Does Web API support OData v3 and JSON light?
Aug 03, 2012 03:16 PM|LINK
Please note that this functionality will be removed in the RTM version (and is already in the daily builds). Like mentioned, it will be released sometime after RTM as a Nuget package.