We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67fb358 commit 51fcbb0Copy full SHA for 51fcbb0
src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
@@ -1344,20 +1344,7 @@ private static string FormatJsonSerializerDefaults(JsonSerializerDefaults defaul
1344
1345
private static string FormatBool(bool value) => value ? "true" : "false";
1346
private static string FormatStringLiteral(string? value)
1347
- {
1348
- string returnValue;
1349
-
1350
- if (value is null)
1351
1352
- returnValue = "null";
1353
- }
1354
- else
1355
1356
- returnValue = SyntaxFactory.Literal(value).ToFullString();
1357
1358
1359
- return returnValue;
1360
+ => value is null ? "null" : SyntaxFactory.Literal(value).ToFullString();
1361
1362
/// <summary>
1363
/// Method used to generate JsonTypeInfo given options instance
0 commit comments