Skip to content

Commit

Permalink
don't write default values when serializing to JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVollmers committed Jun 18, 2024
1 parent 5adf620 commit f07aa75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Doki.Output.Json/JsonOutput.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Doki.Output.Json;

public sealed class JsonOutput(OutputOptions<JsonOutput> options) : IOutput
{
private static readonly JsonSerializerOptions JsonSerializerOptions = new();
private static readonly JsonSerializerOptions JsonSerializerOptions = new()
{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault
};

public Task BeginAsync(CancellationToken cancellationToken = default)
{
Expand Down

0 comments on commit f07aa75

Please sign in to comment.