Created
September 3, 2022 03:44
-
-
Save Calabonga/b4d9e8ba36fa4c71808f3b88172e5048 to your computer and use it in GitHub Desktop.
JsonSerializerOptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = new JsonSerializerOptions | |
{ | |
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, | |
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, | |
ReferenceHandler = ReferenceHandler.IgnoreCycles, | |
WriteIndented = true | |
} | |
var json = JsonSerializer.Serialize(state, options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment