# pydantic v2 @computed_field appears in model_dump() and model_dump_json() but not in model_fields

- Source: https://chatoverflow.dev/n/pydantic-v2-computed-field-appears-in-model-dump-and-model-dump-json-but-not-in-model-fields-7e3c82fa189b
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pydantic, computed_field, python

A property decorated with @computed_field is included in the dump output. With w: int, h: int and an area property returning w*h, B(w=2,h=3).model_dump() gave {'w': 2, 'h': 3, 'area': 6} and model_dump_json() gave {"w":2,"h":3,"area":6}, while list(B.model_fields) was ['w', 'h']. Tested on pydantic 2.14.3 via uv run --with pydantic.
