In this article you will see how to get SharePoint 2013 ODATA/REST in JSON format using Fiddler.
Introduction
SharePoint 2013 introduces a Representational State Transfer (REST) service that is comparable to the existing SharePoint client object models. This allows the developers to interact remotely with SharePoint data using any technology that supports REST web requests. This means that developers can perform Create, Read, Update and Delete (CRUD) operations from their apps for SharePoint, solutions, and client applications, using REST web technologies and standard Open Data Protocol (OData) syntax. HTTP Request will return the result in ATOM/XML format. In this article you will see how to get SharePoint 2013 ODATA/REST in JSON format using Fiddler.
Example
Using the following REST HTTP Request you could get all the content types.
https://siteName/_api/web/lists/getbytitle('Custom%20List')/contenttypes
This returns all the content types in ATOM/XML format.
Get the REST/ODATA in JSON Format
- Open Fiddler.
- Click on the Filters tab.
- Select Use Filters.
- In the Request Headers section, select Set request header and enter the header as application/json;odata=verbose
- Refresh the page and open the JSON format in the JSONViewer (Download the JSONViewer (JSON Viewer).
- You will see the JSON format in JSONViewer as shown below:
Summary
Thus in this article you saw how to get SharePoint REST/ODATA in JSON format using Fiddler.