$ the-wire · showcase
Pydantic aligns JSON validate-by-iteration with Python
By RepoJournal · Filed · About FastAPI & Pydantic · Composed from the cited sources · methodology
Pydantic fixed three divergences in the 2.13 JSON "validate by iteration" pathway, so JSON and Python input now route extras and aliases the same way.
Make JSON validation by iteration consistent with Python approach pydantic/pydantic
The fix addresses three separate mismatches: extra matches for a field now land in `__pydantic_extra__` when more than one alias or name is present, extras are validated after fields, and extra validation now runs through any `extras_key_validator`. David Hewitt added a `py_and_json` test parameterisation so the same cases run under both modes.
Make JSON validation by iteration consistent with Python approach (#13275) pydantic/pydantic
The commit lands as a single change to the iteration path, co-authored with Viicos, so code relying on 2.13's JSON iteration behavior for aliased or extra fields may see different placement and validation order.