Skip to content

Cosmos: allow excluding null values from Json document #26981

@aligunel

Description

@aligunel

When using

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
  [JsonPropertyName("age")]
  public int? Age { get; set; }

This still will create null when saving data in Cosmos Db

{
"age" : null
}

or is there anyway to prevent this ?
This issue tracker is for documentation

For product issues, use https://github.com/aspnet/EntityFramework/issues

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions