API Documentation
Use JSONShield tools programmatically. Free tier: 100 calls/day. Upgrade to Pro for 10,000/day.
Endpoint
POST https://jsonshield.com/api/v1/processRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| tool | string | Yes | Tool name (see list below) |
| input | string | Yes | JSON string to process |
Response Examples
json-formatter
{ "result": "{\n \"name\": \"test\"\n}", "tool": "json-formatter" }json-validator
{ "valid": true, "tool": "json-validator" }
// or
{ "valid": false, "error": "Unexpected token...", "tool": "json-validator" }json-fixer
{
"result": "{\n \"name\": \"test\",\n \"valid\": true\n}",
"fixes": [
"Converted single quotes to double quotes",
"Removed trailing commas",
"Converted Python booleans"
],
"tool": "json-fixer"
}Rate Limits
| Plan | Daily Limit | Price |
|---|---|---|
| Free | 100 calls/day | $0 |
| Pro | 10,000 calls/day | $12/mo |
Code Examples
cURL
curl -X POST https://jsonshield.com/api/v1/process \
-H "Content-Type: application/json" \
-d '{"tool": "json-formatter", "input": "{\"name\":\"test\"}"}'JavaScript
const res = await fetch("https://jsonshield.com/api/v1/process", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
tool: "json-fixer",
input: "{'name': 'test', 'valid': True,}",
}),
});
const data = await res.json();
console.log(data.result); // Fixed JSON
console.log(data.fixes); // ["Converted single quotes...", ...]Python
import requests
res = requests.post("https://jsonshield.com/api/v1/process", json={
"tool": "json-to-csv",
"input": '[{"name":"Alice","age":30},{"name":"Bob","age":25}]'
})
print(res.json()["result"])
# name,age
# Alice,30
# Bob,25Available Tools
| Tool Name | Description |
|---|---|
| json-formatter | Pretty-print JSON with 2-space indent |
| json-validator | Validate JSON and return error details |
| json-minify | Compress JSON to a single line |
| json-fixer | AI repair: fix trailing commas, single quotes, Python booleans, markdown wrappers |
| json-to-csv | Convert JSON array to CSV format |
| json-to-yaml | Convert JSON to YAML |
| json-to-typescript | Generate TypeScript interfaces from JSON |
Error Handling
// 400 Bad Request
{ "error": "Missing 'tool' field.", "available": [...] }
// 422 Processing Error
{ "error": "Processing failed: Unexpected token...", "tool": "json-formatter" }
// 429 Rate Limited
{ "error": "Rate limit exceeded...", "limit": 100, "remaining": 0 }