问题
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