60 references to JsonReaderHelper
System.Text.Json (60)
System\Text\Json\Document\JsonDocument.cs (11)
304? JsonReaderHelper.GetUnescapedString(segment) 305: JsonReaderHelper.TranscodeHelper(segment); 376return JsonReaderHelper.UnescapeAndCompare(segment.Slice(idx), otherUtf8Text.Slice(idx)); 412return JsonReaderHelper.TryGetUnescapedBase64Bytes(segment, out value); 416return JsonReaderHelper.TryDecodeBase64(segment, out value); 681return JsonReaderHelper.TryGetEscapedDateTime(segment, out value); 716return JsonReaderHelper.TryGetEscapedDateTimeOffset(segment, out value); 751return JsonReaderHelper.TryGetEscapedGuid(segment, out value); 770return JsonReaderHelper.TranscodeHelper(segment.Span); 776return JsonReaderHelper.TranscodeHelper(segment.Span); 895JsonReaderHelper.Unescape(text, rent, out int written);
System\Text\Json\Document\JsonDocument.Parse.cs (4)
269int expectedByteCount = JsonReaderHelper.GetUtf8ByteCount(jsonChars); 274int actualByteCount = JsonReaderHelper.GetUtf8FromText(jsonChars, utf8Bytes); 294int expectedByteCount = JsonReaderHelper.GetUtf8ByteCount(jsonChars); 300int actualByteCount = JsonReaderHelper.GetUtf8FromText(jsonChars, utf8Bytes);
System\Text\Json\Document\JsonDocument.TryGetProperty.cs (4)
26int maxBytes = JsonReaderHelper.s_utf8Encoding.GetMaxByteCount(propertyName.Length); 33int len = JsonReaderHelper.GetUtf8FromText(propertyName, utf8Name); 82int len = JsonReaderHelper.GetUtf8FromText(propertyName, tmpUtf8); 192JsonReaderHelper.Unescape(currentPropertyName.Slice(idx), utf8Unescaped, 0, out written);
System\Text\Json\Document\JsonElement.cs (2)
1293return JsonReaderHelper.UnescapeAndCompareBothInputs(element1.ValueSpan, element2.ValueSpan); 1417return JsonReaderHelper.UnescapeAndCompareBothInputs(left.NameSpan, right.NameSpan);
System\Text\Json\JsonEncodedText.cs (3)
36_value = JsonReaderHelper.GetTextFromUtf8(utf8Value); 83int expectedByteCount = JsonReaderHelper.GetUtf8ByteCount(value); 92int actualByteCount = JsonReaderHelper.GetUtf8FromText(value, utf8Bytes);
System\Text\Json\JsonHelpers.cs (1)
25return reader.ValueIsEscaped ? JsonReaderHelper.GetUnescapedSpan(span) : span;
System\Text\Json\Nodes\JsonValueOfTCustomized.cs (1)
60return JsonReaderHelper.ToValueKind(reader.TokenType);
System\Text\Json\Reader\Utf8JsonReader.cs (7)
628return JsonReaderHelper.UnescapeAndCompare(localSpan.Slice(idx), other.Slice(idx)); 669result = JsonReaderHelper.UnescapeAndCompare(localSequence.First.Span, other); 673result = JsonReaderHelper.UnescapeAndCompare(localSequence, other); 1410if (!JsonReaderHelper.IsHexDigit(nextByte)) 1843if (JsonReaderHelper.IsTokenTypePrimitive(_previousTokenType)) 2476(int newLines, int newLineIndex) = JsonReaderHelper.CountNewLines(localBuffer.Slice(0, idx)); 2585span = JsonReaderHelper.GetUnescapedSpan(span);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (3)
870if (!JsonReaderHelper.IsHexDigit(nextByte)) 1007if (!JsonReaderHelper.IsHexDigit(nextByte)) 1684if (JsonReaderHelper.IsTokenTypePrimitive(_previousTokenType))
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (15)
43return JsonReaderHelper.GetUnescapedString(span); 47return JsonReaderHelper.TranscodeHelper(span); 110JsonReaderHelper.ValidateUtf8(utf8Destination.Slice(0, bytesWritten)); 184int charsWritten = JsonReaderHelper.TranscodeHelper(unescapedSource, destination); 220bool success = JsonReaderHelper.TryUnescape(source, destination, out bytesWritten); 246return JsonReaderHelper.TranscodeHelper(span); 598if (JsonReaderHelper.TryGetFloatingPointConstant(span, out float value)) 620if (!JsonReaderHelper.TryGetFloatingPointConstant(span, out float value)) 655if (JsonReaderHelper.TryGetFloatingPointConstant(span, out double value)) 677if (!JsonReaderHelper.TryGetFloatingPointConstant(span, out double value)) 838return JsonReaderHelper.TryGetUnescapedBase64Bytes(span, out value); 842return JsonReaderHelper.TryDecodeBase64(span, out value); 1274return JsonReaderHelper.TryGetEscapedDateTime(span, out value); 1339return JsonReaderHelper.TryGetEscapedDateTimeOffset(span, out value); 1405return JsonReaderHelper.TryGetEscapedGuid(span, out value);
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (1)
143return JsonReaderHelper.TryGetFloatingPointConstant(buffer.Slice(0, written), out value);
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (4)
439new byte[JsonReaderHelper.GetUtf8ByteCount(json)]; 443int actualByteCount = JsonReaderHelper.GetUtf8FromText(json, utf8); 470new byte[JsonReaderHelper.GetUtf8ByteCount(json)]; 474int actualByteCount = JsonReaderHelper.GetUtf8FromText(json, utf8);
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (2)
164return JsonReaderHelper.TranscodeHelper(output.WrittenMemory.Span); 181return JsonReaderHelper.TranscodeHelper(output.WrittenMemory.Span);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (2)
213new byte[JsonReaderHelper.GetUtf8ByteCount(json)]; 217int actualByteCount = JsonReaderHelper.GetUtf8FromText(json, utf8Json);