JSON Debugger

JSON Validator Endpoint

The JSON Validator endpoint allows you to validate and check the correctness of a given JSON object or array. This endpoint ensures that the provided data is in a proper JSON format, checks for any missing fields, or invalid data, and provides feedback on whether the JSON is valid, empty, or malformed.

Endpoint

  • URL: https://api.erensko.xyz/v1/json-validator

  • Method: POST

  • Description: This endpoint accepts a JSON object or array in the request body and validates its structure. It provides a response detailing whether the JSON is valid, empty, or incorrectly formatted.

Body

Key
Value

json

The JSON object or array you would like to validate.

Headers

Key
Value

Authorization

Your own personal API key, create one by clicking here. This is required.

Request Example

POST https://api.erensko.xyz/v1/json-validator

{
  "json": { "name": "John", "age": 30 }
}

Response Example

Success (200 OK) - Valid JSON:

{
  "status": "valid",
  "message": "JSON is correctly formatted.",
  "jsonType": "object"
}

Success (200 OK) - Empty JSON:

{
  "status": "valid",
  "message": "The provided JSON object or array is empty but valid.",
  "jsonType": "object"
}

Error (400 Bad Request) - Missing JSON:

{
  "status": "invalid",
  "message": "Please provide a JSON in your request body.",
  "jsonType": "N/A"
}

Error (400 Bad Request) - Invalid JSON Format:

{
  "status": "invalid",
  "message": "Your JSON is incorrectly formatted.",
  "jsonType": "N/A"
}

Last updated