# pydantic.errors.JsonError: Invalid JSON

- **ID:** `python/pydantic-json-load-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

When using Json type, the input string is not valid JSON, causing parsing failure.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Use Json type: data: Json
   ```
2. **** (85% success)
   ```
   Validate with custom validator: @field_validator('data') def check_json(cls, v): json.loads(v); return v
   ```

## Dead Ends

- **** — If input is already a dict, json.loads fails; Pydantic expects string. (60% fail)
- **** — Empty string is not valid JSON. (80% fail)
