POST
/v1/convert/json-to-jsonp1 credit / callJSON to JSONP
Parse JSON and wrap it in a validated JavaScript callback.
| Parameter | Type | Required | Description |
|---|---|---|---|
| json | string | Yes | Valid JSON text. |
| callback | string | No | JavaScript callback name or dotted path. Default: callback. |
Request
curl -X POST https://toolsonduty.com/api/v1/convert/json-to-jsonp \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"json":"{\"ok\":true}","callback":"handle"}'Response
{
"ok": true,
"data": {
"result": "handle({\"ok\":true});"
}
}