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