JSON & Data Endpoints
JSON Format
Format and prettify JSON strings.
POST /api/v1/json-format
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
json | string | Yes | JSON string to format |
indent | number | No | Indentation level (0-8, default 2) |
Example
curl -X POST https://www.toolbox-kit.com/api/v1/json-format \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"json": "{\"name\":\"test\"}", "indent": 2}'
{ "result": "{\n \"name\": \"test\"\n}" }
JSON Minify
Minify JSON by removing all whitespace.
POST /api/v1/json-minify
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | JSON string to minify |
Example
curl -X POST https://www.toolbox-kit.com/api/v1/json-minify \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"input": "{\n \"name\": \"test\"\n}"}'
{ "result": "{\"name\":\"test\"}", "savings": 18, "savingsPercent": 47 }
JSON Validate
Validate JSON and return structure details.
POST /api/v1/json-validate
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input | string | Yes | JSON string to validate |
Example
curl -X POST https://www.toolbox-kit.com/api/v1/json-validate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"input": "[1, 2, 3]"}'
{ "result": { "valid": true, "type": "array", "keys": 0, "depth": 1, "arrayLength": 3 } }
CSV / JSON Convert
Convert between CSV and JSON formats.
POST /api/v1/csv-json
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | "csv-to-json" or "json-to-csv" |
csv | string | No | CSV string (for csv-to-json) |
data | array | No | Array of objects (for json-to-csv) |
delimiter | string | No | Delimiter character (default ",") |
Example
curl -X POST https://www.toolbox-kit.com/api/v1/csv-json \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"mode": "csv-to-json", "csv": "name,age\nAlice,30\nBob,25"}'
{ "result": [{ "name": "Alice", "age": "30" }, { "name": "Bob", "age": "25" }], "rowCount": 2 }