12 references to JsonSerializerDefaults
System.Text.Json.SourceGeneration (12)
JsonSourceGenerator.Emitter.cs (2)
1174if (optionsSpec.Defaults is JsonSerializerDefaults defaults) 1453private static string FormatJsonSerializerDefaults(JsonSerializerDefaults defaults)
JsonSourceGenerator.Parser.cs (3)
265JsonSerializerDefaults? defaults = null; 293Debug.Assert(attributeData.ConstructorArguments.Length == 1 & attributeData.ConstructorArguments[0].Type?.Name is nameof(JsonSerializerDefaults)); 294defaults = (JsonSerializerDefaults)attributeData.ConstructorArguments[0].Value!;
Model\SourceGenerationOptionsSpec.cs (1)
70=> 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)