JSON API is a specification for building APIs detailed at JSONAPI.org.
Install it from Chrome Web Store
JSON API is quite verbose and it is hard to view big responses with many nested includes e.g. include=foo.bar.baz
.
It would be nice to view in console the deserialized structure of JSON API response. It is a simple object converted from JSON.
JSON API response
{ "data": [ { "id": "1", "type": "town", "attributes": { "name": "Moscow" }, "relationships": { "region": { "data": { "id": "2", "type": "region" } } } } ], "included": [ { "id": "2", "type": "region", "attributes": { "name": "Moscow region" }, "relationships": { "country": { "data": { "id": "3", "type": "country" } } } }, { "id": "3", "type": "country", "attributes": { "name": "Russia" } } ] }
Deserialized structure
{ data: [ { id: "1", type: "town", name: "Moscow", region: { id: "2", type: "region", name: "Moscow region", country: { id: "3", type: "country", name: "Russia" }, } } ] };
Google Chrome 60+
- Install extension
- Add rule (regexp) in options for your JSON API endpoint to catch it
- View data in console (deserialized response, query info, etc.)
Download the source code
- Install dependencies
npm install
- Zip chrome extension
npm run build
This will generate json_api_debugger.zip
for use in Chromium browsers.