22 references to JsonKnownNamingPolicy
System.Text.Json.SourceGeneration (22)
JsonSourceGenerator.Emitter.cs (8)
1213
if (optionsSpec.DictionaryKeyPolicy is
JsonKnownNamingPolicy
dictionaryKeyPolicy)
1246
if (optionsSpec.PropertyNamingPolicy is
JsonKnownNamingPolicy
propertyNamingPolicy)
1273
static string FormatNamingPolicy(
JsonKnownNamingPolicy
knownNamingPolicy)
1277
JsonKnownNamingPolicy
.CamelCase => nameof(JsonNamingPolicy.CamelCase),
1278
JsonKnownNamingPolicy
.SnakeCaseLower => nameof(JsonNamingPolicy.SnakeCaseLower),
1279
JsonKnownNamingPolicy
.SnakeCaseUpper => nameof(JsonNamingPolicy.SnakeCaseUpper),
1280
JsonKnownNamingPolicy
.KebabCaseLower => nameof(JsonNamingPolicy.KebabCaseLower),
1281
JsonKnownNamingPolicy
.KebabCaseUpper => nameof(JsonNamingPolicy.KebabCaseUpper),
JsonSourceGenerator.Parser.cs (9)
270
JsonKnownNamingPolicy
? dictionaryKeyPolicy = null;
281
JsonKnownNamingPolicy
? propertyNamingPolicy = null;
332
dictionaryKeyPolicy = (
JsonKnownNamingPolicy
)namedArg.Value.Value!;
376
propertyNamingPolicy = (
JsonKnownNamingPolicy
)namedArg.Value.Value!;
1604
JsonKnownNamingPolicy
.CamelCase => JsonNamingPolicy.CamelCase,
1605
JsonKnownNamingPolicy
.SnakeCaseLower => JsonNamingPolicy.SnakeCaseLower,
1606
JsonKnownNamingPolicy
.SnakeCaseUpper => JsonNamingPolicy.SnakeCaseUpper,
1607
JsonKnownNamingPolicy
.KebabCaseLower => JsonNamingPolicy.KebabCaseLower,
1608
JsonKnownNamingPolicy
.KebabCaseUpper => JsonNamingPolicy.KebabCaseUpper,
Model\SourceGenerationOptionsSpec.cs (2)
69
public
JsonKnownNamingPolicy
? GetEffectivePropertyNamingPolicy()
70
=> PropertyNamingPolicy ?? (Defaults is JsonSerializerDefaults.Web ?
JsonKnownNamingPolicy
.CamelCase : null);
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (3)
34
PropertyNamingPolicy =
JsonKnownNamingPolicy
.CamelCase;
71
public
JsonKnownNamingPolicy
DictionaryKeyPolicy { get; set; }
111
public
JsonKnownNamingPolicy
PropertyNamingPolicy { get; set; }