Skip to content

Commit

Permalink
Reduce max depth (#2912)
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon authored Sep 25, 2023
1 parent 5207956 commit bfe6d13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Neo.Json/JToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public int GetInt32()
/// <param name="value">The byte array that contains the JSON token.</param>
/// <param name="max_nest">The maximum nesting depth when parsing the JSON token.</param>
/// <returns>The parsed JSON token.</returns>
public static JToken? Parse(ReadOnlySpan<byte> value, int max_nest = 100)
public static JToken? Parse(ReadOnlySpan<byte> value, int max_nest = 64)
{
Utf8JsonReader reader = new(value, new JsonReaderOptions
{
Expand All @@ -153,7 +153,7 @@ public int GetInt32()
/// <param name="value">The <see cref="string"/> that contains the JSON token.</param>
/// <param name="max_nest">The maximum nesting depth when parsing the JSON token.</param>
/// <returns>The parsed JSON token.</returns>
public static JToken? Parse(string value, int max_nest = 100)
public static JToken? Parse(string value, int max_nest = 64)
{
return Parse(StrictUTF8.GetBytes(value), max_nest);
}
Expand Down

0 comments on commit bfe6d13

Please sign in to comment.