Reparar JSON roto
json-repairRepara JSON casi válido típico de salidas de LLM (comillas simples, comas, claves sin comillas, True/None, llaves sin cerrar) y devuelve el valor y los arreglos. Cuándo: un modelo devolvió JSON casi válido que hay que leer sin volver a pedírselo al modelo. No para: verificar si un texto es JSON válido (json-parse-check). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Repairs almost-JSON typical of LLM output (code fences, comments, single quotes, unquoted keys, trailing or missing commas, Python True/False/None, NaN, unclosed strings and brackets) and returns the parsed value and the fixes applied. When: a model returned almost-valid JSON that has to be parsed without asking the model again. Not for: checking whether text is valid JSON (json-parse-check). [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Broken JSON text (string; required). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | any JSON value | |
| fixes | No | ||
| value | No | any JSON value | |
| changed | No | ||
| repaired | No |