Commit b6dc05b 1 parent 15525f1 commit b6dc05b Copy full SHA for b6dc05b
File tree 3 files changed +5
-5
lines changed
Newtonsoft.Json.Tests/Serialization
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8000,10 +8000,10 @@ public void NullableDoubleEmptyValue()
8000
8000
public void SetMaxDepth_DepthExceeded ( )
8001
8001
{
8002
8002
JsonTextReader reader = new JsonTextReader ( new StringReader ( "[[['text']]]" ) ) ;
8003
- Assert . AreEqual ( 128 , reader . MaxDepth ) ;
8003
+ Assert . AreEqual ( 64 , reader . MaxDepth ) ;
8004
8004
8005
8005
JsonSerializerSettings settings = new JsonSerializerSettings ( ) ;
8006
- Assert . AreEqual ( 128 , settings . MaxDepth ) ;
8006
+ Assert . AreEqual ( 64 , settings . MaxDepth ) ;
8007
8007
Assert . AreEqual ( false , settings . _maxDepthSet ) ;
8008
8008
8009
8009
// Default should be the same
@@ -8034,7 +8034,7 @@ public void SetMaxDepth_DepthNotExceeded()
8034
8034
8035
8035
serializer . Deserialize ( reader ) ;
8036
8036
8037
- Assert . AreEqual ( 128 , reader . MaxDepth ) ;
8037
+ Assert . AreEqual ( 64 , reader . MaxDepth ) ;
8038
8038
}
8039
8039
}
8040
8040
}
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ protected JsonReader()
329
329
_dateTimeZoneHandling = DateTimeZoneHandling . RoundtripKind ;
330
330
_dateParseHandling = DateParseHandling . DateTime ;
331
331
_floatParseHandling = FloatParseHandling . Double ;
332
- _maxDepth = 128 ;
332
+ _maxDepth = 64 ;
333
333
334
334
CloseInput = true ;
335
335
}
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public class JsonSerializerSettings
61
61
internal static readonly CultureInfo DefaultCulture ;
62
62
internal const bool DefaultCheckAdditionalContent = false ;
63
63
internal const string DefaultDateFormatString = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK" ;
64
- internal const int DefaultMaxDepth = 128 ;
64
+ internal const int DefaultMaxDepth = 64 ;
65
65
66
66
internal Formatting ? _formatting ;
67
67
internal DateFormatHandling ? _dateFormatHandling ;
You can’t perform that action at this time.
0 commit comments