简体   繁体   English

OData v3和OData v4之间的区别

[英]Difference between OData v3 and OData v4

We have a requirement of using both Odata v3 and Odata v4. 我们要求使用Odata v3和Odata v4。

Actually we need to hit the web services exposing both these versions. 实际上我们需要点击暴露这两个版本的Web服务。 We are using Java platform. 我们正在使用Java平台。 What are the changes between these two versions — Will it be a major change? 这两个版本之间有什么变化 - 这是一个重大变化吗?

Query formation to hit those web services changes depending upon the version? 查询形成以根据版本命中这些Web服务更改? Does the API also change? API也会改变吗? What are the technical points we need to take care of while calling both of these versions? 在调用这两个版本时我们需要注意哪些技术要点?

Will there be any difference in the response we get? 我们得到的回应会有什么不同吗? I heard the default response for v4 is JSON and for V3 is XML — is that true? 我听说v4的默认响应是JSON,而V3是XML - 这是真的吗?

I tried with the below examples: 我尝试了以下示例:

http://services.odata.org/V3/Northwind/Northwind.svc/Customers http://services.odata.org/V3/Northwind/Northwind.svc/Customers

http://services.odata.org/V4/Northwind/Northwind.svc/Customers http://services.odata.org/V4/Northwind/Northwind.svc/Customers

Kindly provide us the details. 请向我们提供详细信息。

There are quite some differences between OData v3 and v4, so it is most likely not going to be straightforward to support v4. OData v3和v4之间存在很多差异,因此很可能不会直接支持v4。

As far as I know the default format in v4 is indeed JSON, but it also supports XML; 据我所知,v4中的默认格式确实是JSON,但它也支持XML; you're not required to use JSON. 你不需要使用JSON。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM