-
-
Save lgolubyev/dc263dbb8bdc2c829632ec04f6837c71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int valueLength = reader.HasReadOnlySequence ? checked((int)ValueSequence.Length) : ValueSpan.Length; | |
char[] buffer = ArrayPool<char>.Shared.Rent(valueLength); | |
int charsRead = reader.CopyString(buffer); | |
ReadOnlySpan<char> source = buffer.Slice(0, charsRead); | |
ParseUnescapedString(source); // handle the unescaped JSON string | |
ArrayPool<char>.Shared.Return(buffer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment