TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Parses a JSON body and describes its structure

POSThttps://api.testingapis.com/api/bodies/jsonSign in to see this endpoint's URL

Accepts application/json and application/*+json.

Request body

Optional. application/json, application/*+json. Any JSON value: object, array or scalar.

Example body
{"name": "Ada", "skills": ["math", "code"], "active": true}

Responses

200
Root type, top-level keys or array length, and the parsed value.
400
Empty or malformed JSON.
415
Any other Content-Type.

Example

Request
curl -X POST "https://api.testingapis.com/api/bodies/json" \
  -H "Content-Type: application/json" \
  -d '{"name": "Ada", "skills": ["math", "code"], "active": true}' \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "contentType": "application/json",
  "rootType": "object",
  "keys": ["name", "skills", "active"],
  "length": null,
  "received": {"name": "Ada", "skills": ["math", "code"], "active": true}
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.