@@ -98,7 +98,7 @@ static JsonSerializerSettings RoundDoublesCore(this JsonSerializerSettings setti
9898
9999 static JsonSerializerSettings RoundNullableDoublesCore ( this JsonSerializerSettings settings , int maxDecimals )
100100 {
101- var existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < double ? > ) ;
101+ JsonConverter ? existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < double ? > ) ;
102102 if ( existing is JsonNullableDoubleConverter && existing . GetType ( ) == typeof ( JsonNullableDoubleConverter ) )
103103 {
104104 settings . Converters . Remove ( existing ) ;
@@ -118,7 +118,7 @@ public static JsonSerializerSettings RoundDoubles(this JsonSerializerSettings se
118118
119119 public static JsonSerializerSettings NormalizeDecimals ( this JsonSerializerSettings settings )
120120 {
121- var existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < decimal > ) ;
121+ JsonConverter ? existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < decimal > ) ;
122122 var existingNullable = settings . Converters . FirstOrDefault ( c => c is JsonConverter < decimal ? > ) ;
123123
124124 if ( existing is JsonDecimalConverter && existingNullable is JsonNullableDecimalConverter )
@@ -137,7 +137,7 @@ public static JsonSerializerSettings NormalizeDecimals(this JsonSerializerSettin
137137
138138 static JsonSerializerSettings RoundDecimalsCore ( this JsonSerializerSettings settings , int maxDecimals )
139139 {
140- var existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < decimal > ) ;
140+ JsonConverter ? existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < decimal > ) ;
141141 if ( existing is JsonDecimalConverter && existing . GetType ( ) == typeof ( JsonDecimalConverter ) )
142142 {
143143 settings . Converters . Remove ( existing ) ;
@@ -152,7 +152,7 @@ static JsonSerializerSettings RoundDecimalsCore(this JsonSerializerSettings sett
152152
153153 static JsonSerializerSettings RoundNullableDecimalsCore ( this JsonSerializerSettings settings , int maxDecimals )
154154 {
155- var existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < decimal ? > ) ;
155+ JsonConverter ? existing = settings . Converters . FirstOrDefault ( c => c is JsonConverter < decimal ? > ) ;
156156 if ( existing is JsonNullableDecimalConverter && existing . GetType ( ) == typeof ( JsonNullableDecimalConverter ) )
157157 {
158158 settings . Converters . Remove ( existing ) ;
0 commit comments