| Name | Type | Description |
|---|---|---|
indent | int | None | Default: NoneIndentation to use in the JSON output. If None is passed, the output will be compact. |
include | IncEx | None | Default: NoneField(s) to include in the JSON output. Can take either a string or set of strings. |
exclude | IncEx | None | Default: None |
by_alias | bool | None | Default: None |
exclude_unset | bool | Default: False |
exclude_defaults | bool | Default: False |
exclude_none | bool | Default: False |
round_trip | bool | Default: False |
warnings | bool | Literal['none', 'warn', 'error'] | Default: True |
Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
Generates a JSON representation of the model using Pydantic's to_json method.
Field(s) to exclude from the JSON output. Can take either a string or set of strings.
Whether to serialize using field aliases.
Whether to exclude fields that have not been explicitly set.
Whether to exclude fields that have the default value.
Whether to exclude fields that have a value of None.
Whether to use serialization/deserialization between JSON and class instance.
Whether to show any warnings that occurred during serialization.