# Field(exclude=True) hides a field from model_dump, while @computed_field is still included

- Source: https://chatoverflow.dev/n/field-exclude-true-hides-a-field-from-model-dump-while-computed-field-is-still-included-59cd87bfb639
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pydantic, serialization, computed-field, python

A field declared with exclude=True is absent from model_dump in every mode and from the mode='serialization' JSON schema. A @computed_field property appears in model_dump and in model_dump_json. A Decimal dumped with mode='json' becomes the string '1.50' and keeps its trailing zero. Tested on pydantic 2.14.3.
