Skip to Content
0

Sap odata call json format changes the entity set name

Sep 14, 2017 at 06:09 AM

22

avatar image
Former Member

When I call the odata service in json format like below: http://xxx.xxx.xxx.xxx/xxx/xxx/odata/xxx/TEST_SERVICE/SocSet?$format=json).

during the answer it changes the entity set name from SocSet to SocCollection. In this odata I have created 3 entities set and when I call the service in json format it changes all the entities set names.

"results":[{"__metadata":{"id":"http://xxxxxxxx/xxx/xxx/odata/sap/TEST_SERVICE/SocCollection('0001')","uri":"http://xxxxxxxx/xxx/xxx/odata/sap/TEST_SERVICE/SocCollection('0001')","type":"TEST_SERVICE.Soc"},.........

One thing that I have notice is that when I have only one entity set and I call the service with json format it works. But in my case I have 3 entity set in one odata. I need the SocCollection to be SocSet()

When I use the format=xml it works fine.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers