on 12-05-2013 5:24 AM
Is there any way i can get the metadata of OData service in JSON format ?
Dear Syam,
this is the URL
***/sap/opu/odata/sap/ZCOUNTRY1_SRV/$metadata?sap-client=800&$format=JSON
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreehari,
As per SAP releases Odata metadata is not supports JSON,It supports only XML.
In order to consume an OData service, you should retrieve the metadata that describes
the service. This is done by adding the suffix $metadata to the Service Document
URL. (OData metadata is only available in XML format, not JSON)
Try with below URL ..You will get all Entity Sets(Collection) available in your model
***/sap/opu/odata/sap/ZCOUNTRY1_SRV/?$format=JSON
Thanks,
Syam
Ok,
So no donuts .. its the time to start parsing XML then
Thanks guys ....Closing the post
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
$format=json is supported only on ServiceDocument and on Runtime UrL's
Regards,
Suma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreehari,
Yes,you can pass the required format in the URL.
Example:
/FLIGHTINFORMATION/$metadata?sap-client=100&$format=xml
/FLIGHTINFORMATION/$metadata?sap-client=100&$format=JSON
Thanks,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.