Utf8JsonReader.ValueSpan Utf8JsonReader.ValueSpan Utf8JsonReader.ValueSpan Utf8JsonReader.ValueSpan Property


Gets the value of the last processed token as a ReadOnlySpan<byte> slice of the input payload. If the JSON is provided within a ReadOnlySequence<byte> and the slice that represents the token value fits in a single segment, then ValueSpan contains the sliced value since it can be represented as a span. Otherwise, the ValueSequence contains the token value.

 property ReadOnlySpan<System::Byte> ValueSpan { ReadOnlySpan<System::Byte> get(); };
public ReadOnlySpan<byte> ValueSpan { get; }
member this.ValueSpan : ReadOnlySpan<byte>
Public ReadOnly Property ValueSpan As ReadOnlySpan(Of Byte)

Property Value


If HasValueSequence is true, ValueSpan is empty. Therefore, only access ValueSpan if HasValueSequence is false. Otherwise, the token value must be accessed from ValueSequence.

Applies to