How do I get Odata Web API to return data in the XML format

走远了吗. 提交于 2019-12-12 14:36:22

问题


I have created a Odata Web API service, by default this service returns data in JSON format. How can I get the data in the XML format?

Thanks


回答1:


If you are using OData V4, JSON is the default and recommended format for response payload and also the OASIS standard. So I highly recommend you to use JSON unless you have special reasons. If you have to get XML format, the thread WebAPI OData $format to xml may be helpful.



来源:https://stackoverflow.com/questions/25402483/how-do-i-get-odata-web-api-to-return-data-in-the-xml-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!