@@ -637,10 +637,10 @@ private string GenerateFastPathFuncForObject(
637
637
bool canBeNull ,
638
638
List < PropertyGenerationSpec > ? properties )
639
639
{
640
- JsonSerializerOptionsAttribute options = _currentContext . SerializerOptions ;
640
+ JsonSourceGenerationOptionsAttribute options = _currentContext . GenerationOptions ;
641
641
642
642
// Add the property names to the context-wide cache; we'll generate the source to initialize them at the end of generation.
643
- string [ ] runtimePropNames = GetRuntimePropNames ( properties , options . NamingPolicy ) ;
643
+ string [ ] runtimePropNames = GetRuntimePropNames ( properties , options . PropertyNamingPolicy ) ;
644
644
_currentContext . RuntimePropertyNames . UnionWith ( runtimePropNames ) ;
645
645
646
646
StringBuilder sb = new ( ) ;
@@ -855,7 +855,7 @@ private string DetermineRuntimePropName(string clrPropName, string? jsonPropName
855
855
{
856
856
runtimePropName = jsonPropName ;
857
857
}
858
- else if ( namingPolicy == JsonKnownNamingPolicy . BuiltInCamelCase )
858
+ else if ( namingPolicy == JsonKnownNamingPolicy . CamelCase )
859
859
{
860
860
runtimePropName = JsonNamingPolicy . CamelCase . ConvertName ( clrPropName ) ;
861
861
}
@@ -890,7 +890,7 @@ private string GenerateForType(TypeGenerationSpec typeMetadata, string metadataI
890
890
891
891
private string WrapWithCheckForCustomConverterIfRequired ( string source , string typeCompilableName , string typeFriendlyName , string numberHandlingNamedArg )
892
892
{
893
- if ( _currentContext . SerializerOptions . IgnoreRuntimeCustomConverters )
893
+ if ( _currentContext . GenerationOptions . IgnoreRuntimeCustomConverters )
894
894
{
895
895
return source ;
896
896
}
@@ -933,9 +933,9 @@ private string GetRootJsonContextImplementation()
933
933
934
934
private string GetLogicForDefaultSerializerOptionsInit ( )
935
935
{
936
- JsonSerializerOptionsAttribute options = _currentContext . SerializerOptions ;
936
+ JsonSourceGenerationOptionsAttribute options = _currentContext . GenerationOptions ;
937
937
938
- string ? namingPolicyInit = options . NamingPolicy == JsonKnownNamingPolicy . BuiltInCamelCase
938
+ string ? namingPolicyInit = options . PropertyNamingPolicy == JsonKnownNamingPolicy . CamelCase
939
939
? $@ "
940
940
PropertyNamingPolicy = { JsonNamingPolicyTypeRef } .CamelCase"
941
941
: null ;
@@ -953,7 +953,7 @@ private string GetLogicForDefaultSerializerOptionsInit()
953
953
954
954
private string GetFetchLogicForRuntimeSpecifiedCustomConverter ( )
955
955
{
956
- if ( _currentContext . SerializerOptions . IgnoreRuntimeCustomConverters )
956
+ if ( _currentContext . GenerationOptions . IgnoreRuntimeCustomConverters )
957
957
{
958
958
return "" ;
959
959
}
0 commit comments