validate_json_string
Validate JSON strings, detect syntax errors with line and column, and get root type, counts, depth, plus formatted and minified versions.
Instructions
Validate, format, and analyze a JSON string.
Returns whether the JSON is valid, root type, key/item count, nesting depth, a pretty-printed version, and a minified version. On error, returns the line and column of the syntax mistake.
Args: json_string: The raw JSON string to validate (e.g. '{"key": "value"}')
Returns: dict with keys: valid, root_type, key_count, item_count, depth, formatted, minified (or error, line, column), cost_usd
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json_string | Yes |