12 references to JsonSerializerDefaults
System.Text.Json.SourceGeneration (12)
JsonSourceGenerator.Emitter.cs (2)
1096if (optionsSpec.Defaults is JsonSerializerDefaults defaults) 1352private static string FormatJsonSerializerDefaults(JsonSerializerDefaults defaults)
JsonSourceGenerator.Parser.cs (3)
265JsonSerializerDefaults? defaults = null; 290Debug.Assert(attributeData.ConstructorArguments.Length == 1 & attributeData.ConstructorArguments[0].Type?.Name is nameof(JsonSerializerDefaults)); 291defaults = (JsonSerializerDefaults)attributeData.ConstructorArguments[0].Value!;
Model\SourceGenerationOptionsSpec.cs (1)
64=> PropertyNamingPolicy ?? (Defaults is JsonSerializerDefaults.Web ? JsonKnownNamingPolicy.CamelCase : null);
src\libraries\System.Text.Json\Common\JsonSerializerDefaults.cs (1)
12/// Specifies that general-purpose values should be used. These are the same settings applied if a <see cref="JsonSerializerDefaults"/> isn't specified.
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (5)
23/// Constructs a new <see cref="JsonSourceGenerationOptionsAttribute"/> instance with a predefined set of options determined by the specified <see cref="JsonSerializerDefaults"/>. 25/// <param name="defaults">The <see cref="JsonSerializerDefaults"/> to reason about.</param> 27public JsonSourceGenerationOptionsAttribute(JsonSerializerDefaults defaults) 31if (defaults is JsonSerializerDefaults.Web) 37else if (defaults is not JsonSerializerDefaults.General)