Skip to content

Cosmos: allow excluding null values from Json document #26981

Open

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions