Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Merge in 'release/3.1' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Aug 17, 2022
2 parents b595a77 + a61d14b commit 0ea07d1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<XUnitPackageVersion>2.4.1</XUnitPackageVersion>
<TraceEventPackageVersion>2.0.5</TraceEventPackageVersion>
<MicrosoftDotNetUapTestToolsPackageVersion>1.0.31</MicrosoftDotNetUapTestToolsPackageVersion>
<NewtonsoftJsonPackageVersion>12.0.1</NewtonsoftJsonPackageVersion>
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
<MicrosoftDotNetPlatformAbstractionsPackageVersion>3.0.0-preview6-27804-01</MicrosoftDotNetPlatformAbstractionsPackageVersion>
<!-- Test data -->
<SystemIOCompressionTestDataPackageVersion>5.0.0-beta.20105.1</SystemIOCompressionTestDataPackageVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/System.Text.Json/tests/JsonDocumentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ private static void ParseJson(

using (var stream = new MemoryStream(dataUtf8))
using (var streamReader = new StreamReader(stream, Encoding.UTF8, false, 1024, true))
using (JsonTextReader jsonReader = new JsonTextReader(streamReader))
using (JsonTextReader jsonReader = new JsonTextReader(streamReader) { MaxDepth = null })
{
JToken jToken = JToken.ReadFrom(jsonReader);

Expand Down Expand Up @@ -3662,7 +3662,7 @@ private static string GetCompactJson(TestCaseType testCaseType, string jsonStrin
return existing;
}

using (JsonTextReader jsonReader = new JsonTextReader(new StringReader(jsonString)))
using (JsonTextReader jsonReader = new JsonTextReader(new StringReader(jsonString)) { MaxDepth = null })
{
jsonReader.FloatParseHandling = FloatParseHandling.Decimal;
JToken jtoken = JToken.ReadFrom(jsonReader);
Expand Down
10 changes: 5 additions & 5 deletions src/System.Text.Json/tests/JsonTestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal static class JsonTestHelper
public static string NewtonsoftReturnStringHelper(TextReader reader)
{
var sb = new StringBuilder();
var json = new JsonTextReader(reader);
var json = new JsonTextReader(reader) { MaxDepth = null };
while (json.Read())
{
if (json.Value != null)
Expand Down Expand Up @@ -345,7 +345,7 @@ public static string InsertCommentsEverywhere(string jsonString)
{
writer.Formatting = Formatting.Indented;

var newtonsoft = new JsonTextReader(new StringReader(jsonString));
var newtonsoft = new JsonTextReader(new StringReader(jsonString)) { MaxDepth = null };
writer.WriteComment("comment");
while (newtonsoft.Read())
{
Expand All @@ -359,7 +359,7 @@ public static string InsertCommentsEverywhere(string jsonString)

public static List<JsonTokenType> GetTokenTypes(string jsonString)
{
var newtonsoft = new JsonTextReader(new StringReader(jsonString));
var newtonsoft = new JsonTextReader(new StringReader(jsonString)) { MaxDepth = null };
int totalReads = 0;
while (newtonsoft.Read())
{
Expand All @@ -370,7 +370,7 @@ public static List<JsonTokenType> GetTokenTypes(string jsonString)

for (int i = 0; i < totalReads; i++)
{
newtonsoft = new JsonTextReader(new StringReader(jsonString));
newtonsoft = new JsonTextReader(new StringReader(jsonString)) { MaxDepth = null };
for (int j = 0; j < i; j++)
{
Assert.True(newtonsoft.Read());
Expand Down Expand Up @@ -690,7 +690,7 @@ public static decimal NextDecimal(Random random, double minValue, double maxValu

public static string GetCompactString(string jsonString)
{
using (JsonTextReader jsonReader = new JsonTextReader(new StringReader(jsonString)))
using (JsonTextReader jsonReader = new JsonTextReader(new StringReader(jsonString)) { MaxDepth = null })
{
jsonReader.FloatParseHandling = FloatParseHandling.Decimal;
JToken jtoken = JToken.ReadFrom(jsonReader);
Expand Down
2 changes: 1 addition & 1 deletion src/System.Text.Json/tests/Utf8JsonReaderTests.TryGet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ public static void TestingGetString(string jsonString)
var expectedPropertyNames = new List<string>();
var expectedValues = new List<string>();

var jsonNewtonsoft = new JsonTextReader(new StringReader(jsonString));
var jsonNewtonsoft = new JsonTextReader(new StringReader(jsonString)) { MaxDepth = null };
while (jsonNewtonsoft.Read())
{
if (jsonNewtonsoft.TokenType == JsonToken.String)
Expand Down

0 comments on commit 0ea07d1

Please sign in to comment.