We have a requirement of using both Odata v3 and Odata v4.
Actually we need to hit the web services exposing both these versions. We are using Java platform. 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? Does the API also change? 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?
I tried with the below examples:
http://services.odata.org/V3/Northwind/Northwind.svc/Customers
http://services.odata.org/V4/Northwind/Northwind.svc/Customers
Kindly provide us the details.
According to the OData 2 specification, payload had to be retrieved in both XML and JSON formats. In OData 4 however, XML is optional. So, Hybrid Data Pipeline today supports both XML and JSON in OData 2 and only JSON in OData 4. However, the metadata can still be retrieved in the XML format in OData 4.
The Open Data Protocol (OData) enables the creation of REST-based data services, which allow resources, identified using Uniform Resource Locators (URLs) and defined in an Entity Data Model (EDM), to be published and edited by Web clients using simple HTTP messages.
OData Version 4.01 The OASIS OData Technical Committee has published the latest OData 4.01 draft as a Committee Specification.
There are quite some differences between OData v3 and v4, so it is most likely not going to be straightforward to support v4.
As far as I know the default format in v4 is indeed JSON, but it also supports XML; you're not required to use JSON.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With