Web API Return Pure Json Data

Web API Return Pure JSON Data

When working with Web API, it is important to return data in the response in form of JSON Data so that a Client consuming the data won't do much to clean the data. You could append or define a format of data expected to be returned in the Http Header when making a request, however, in this case, we want to return pure JSON and make it a Web API standard.


Just add the code below in the WebApiConfig.cs file and problem solved:
//Remove xml formatter

Edit this Article
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy