Validate Your Payload in Under Five Minutes
Skip the documentation deep dives. Follow these three steps to verify your `config_v2.json` against JSONify's strict schema rules using either your terminal or a local Python script.
Step 1: Prepare Your File
Place your target JSON document in your working directory. For this guide, we assume a file named `payload_2024.json` containing nested user objects and timestamp arrays.
Step 2: Choose Your Runtime
JSONify accepts direct HTTP POST requests via `curl` or integrates seamlessly with Python 3.8+ using the `requests` library. Both methods return a unified validation report.
Step 3: Parse the Response
A `200 OK` status with `"valid": true` means your structure passes. Any syntax errors, missing keys, or type mismatches will return a `400 Bad Request` with exact line numbers.
Terminal & Python Snippets
Run these exact commands against the public `api.jsonify.dev/v1/validate` endpoint. Replace the file path if your payload uses a different name.
Method A: curl (macOS/Linux)
Stream your local file directly to the validation engine and format the output for readability.
curl -X POST https://api.jsonify.dev/v1/validate \
-H "Content-Type: application/json" \
-d @payload_2024.json \
--compressed
Method B: Python 3.9+
Use this script to programmatically validate and log results to your console. Requires `pip install requests`.
import requests
import json
def validate_json(filepath):
with open(filepath, 'r') as f:
payload = json.load(f)
response = requests.post(
'https://api.jsonify.dev/v1/validate',
json=payload,
headers={'X-Project-ID': 'tech_json_toolkit'}
)
print(f"Status: {response.status_code}")
print(response.json())
validate_json('payload_2024.json')
Both methods return a structured report within 200ms. If you encounter a `422 Unprocessable Entity`, check for trailing commas or unescaped quotes in your source file.