You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Escaped characters don't work in the current implementation of JsonString (and they should, similar to JsonElement.GetDateTime and Utf8JsonReader.GetDateTime).
stringtestStr="\"\\u0031997-07-16T19:20:30.4555555+14:00\"";usingvardoc= JsonDocument.Parse(testStr);
Assert.True(doc.RootElement.TryGetDateTime(out DateTime dateTimeVal));varjsonString=new JsonString(testStr);// This currently fails, returning false.
Assert.True(jsonString.TryGetDateTime(out dateTimeVal));
See dotnet/corefx#42574 (comment)
Escaped characters don't work in the current implementation of
JsonString
(and they should, similar toJsonElement.GetDateTime
andUtf8JsonReader.GetDateTime
).See https://github.com/dotnet/corefx/blob/dc6136f34c7d4ebbc493a7bb6cf1d15bc82250e6/src/System.Text.Json/src/System/Text/Json/Reader/Utf8JsonReader.TryGet.cs#L849-L852
https://github.com/dotnet/corefx/blob/dc6136f34c7d4ebbc493a7bb6cf1d15bc82250e6/src/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs#L665-L669
cc @khellang
The text was updated successfully, but these errors were encountered: