-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Text.Jsonhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstest-enhancementImprovements of test source codeImprovements of test source code
Milestone
Description
There are subtle differences between Newtonsoft.Json and S.T.Json on how characters are escaped (upper case hex digits vs lower case), etc. This requires helpers for testing. Capturing the TODO into an issue: dotnet/corefx#39900 (comment).
runtime/src/libraries/System.Text.Json/tests/JsonTestHelper.cs
Lines 721 to 723 in d4b06b1
| // Temporary hack until we can use the same escape algorithm on both sides and make sure we want uppercase hex. | |
| // Todo: create new AssertContentsAgainJsonNet to avoid calling NormalizeToJsonNetFormat when not necessary. | |
| Assert.Equal(expectedValue.NormalizeToJsonNetFormat(), value.NormalizeToJsonNetFormat()); |
runtime/src/libraries/System.Text.Json/tests/JsonTestHelper.cs
Lines 743 to 745 in d4b06b1
| // Temporary hack until we can use the same escape algorithm on both sides and make sure we want uppercase hex. | |
| // Todo: create new AssertContentsNotEqualAgainJsonNet to avoid calling NormalizeToJsonNetFormat when not necessary. | |
| Assert.NotEqual(expectedValue.NormalizeToJsonNetFormat(), value.NormalizeToJsonNetFormat()); |
cc @steveharter
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Text.Jsonhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstest-enhancementImprovements of test source codeImprovements of test source code