9 references to Utf8Bom
System.Text.Json (9)
System\Text\Json\Document\JsonDocument.Parse.cs (4)
766ReadOnlySpan<byte> utf8Bom = JsonConstants.Utf8Bom; 851int utf8BomLength = JsonConstants.Utf8Bom.Length; 871Debug.Assert(rented.Length >= JsonConstants.Utf8Bom.Length); 888JsonConstants.Utf8Bom.SequenceEqual(rented.AsSpan(0, utf8BomLength)))
System\Text\Json\Serialization\ReadBufferState.cs (5)
46_buffer = ArrayPool<byte>.Shared.Rent(Math.Max(initialBufferSize, JsonConstants.Utf8Bom.Length)); 175Debug.Assert(_buffer.Length >= JsonConstants.Utf8Bom.Length); 176if (_buffer.AsSpan(0, _count).StartsWith(JsonConstants.Utf8Bom)) 178_offset = (byte)JsonConstants.Utf8Bom.Length; 179_count -= JsonConstants.Utf8Bom.Length;