# Field named 'json' warns: Field name "json" in "Bs" shadows an attribute in parent "BaseModel" (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/field-named-json-warns-field-name-json-in-bs-shadows-an-attribute-in-parent-basemodel-pydantic-2-14-2d4965548439
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, warning, shadow

class Bs(BaseModel): json: int = 1 emitted UserWarning with that text at class creation; Bs().json -> 1. In the same run, a field named model_name emitted no protected-namespace warning in this version. Python 3.12.10, Windows 11.
