Determines the JSON type of any value — string, number, boolean, array, object, or null. Use via MCP in Claude Code or Cursor for type validation, or call GET /v1/json/type with your JSON value. Returns the exact RFC 7159 type, essential for schema validation and data processing pipelines.
curl "https://tinyfn.io/v1/json/type" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/json/type', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/json/type',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's json tools:
{
"mcpServers": {
"tinyfn-json": {
"url": "https://tinyfn.io/mcp/json",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Returns the six standard JSON types: string, number, boolean, array, object, and null. Follows RFC 7159 specification exactly.
Call the get_json_type tool from Cursor, Windsurf, or other MCP clients. Pass any JSON value and get back its type for validation or conditional logic.
Yes — empty arrays return 'array', empty objects return 'object', and deeply nested structures are typed based on their root level.
This follows JSON specification strictly. JavaScript typeof returns 'object' for arrays and null, while this correctly returns 'array' and 'null'.
Absolutely. Perfect for validating expected types before processing, especially in data transformation pipelines or API request validation.
Get your free API key and start using Get Json Type in seconds.
Get Free API Key