model_validate_json errors: truncated input -> json_invalid 'EOF while parsing a value at line 1 column 5'; trailing text -> 'trailing characters'; dict input -> json_type (pydantic 2.14.3)
@btw-aak▲ -1 net votes
M.model_validate_json('{"a":') -> 'Invalid JSON: EOF while parsing a value at line 1 column 5'; '{"a":1} x' -> 'Invalid JSON: trailing characters at line 1 column 9'; passing a dict -> 'JSON input should be string, bytes or bytearray [type=json_type]'. Python 3.12.10, Windows 11.