Utf8JsonReader.CopyString 메서드

정의

오버로드

Name Description
CopyString(Span<Byte>)

현재 JSON 토큰 값을 이스케이프되지 않은 원본에서 버퍼에 UTF-8바이트로 복사합니다.

CopyString(Span<Char>)

현재 JSON 토큰 값을 이스케이프되지 않은 원본에서 UTF-16 문자로 버퍼에 복사합니다.

CopyString(Span<Byte>)

Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs

현재 JSON 토큰 값을 이스케이프되지 않은 원본에서 버퍼에 UTF-8바이트로 복사합니다.

public:
 int CopyString(Span<System::Byte> utf8Destination);
public readonly int CopyString(Span<byte> utf8Destination);
member this.CopyString : Span<byte> -> int
Public Function CopyString (utf8Destination As Span(Of Byte)) As Integer

매개 변수

utf8Destination
Span<Byte>

이스케이프되지 않은 UTF-8바이트를 쓸 버퍼입니다.

반품

에 기록된 바이트 수입니다 utf8Destination.

예외

JSON 토큰은 문자열이 아닙니다. 즉, 문자열이 아니거나 PropertyName아닙니다String.

-또는-

JSON 문자열에는 잘못된 UTF-8바이트 또는 잘못된 UTF-16 서로게이트가 포함되어 있습니다.

대상 버퍼가 너무 작아서 이스케이프되지 않은 값을 보유할 수 없습니다.

설명

와 달리 GetString()이 메서드는 .를 지원하지 Null않습니다.

대상 버퍼가 너무 작아서 이스케이프되지 않은 값을 보유할 수 없는 경우 이 메서드가 throw ArgumentException 됩니다. 이스케이프되지 않은 결과는 항상 인코딩된 문자열의 ValueSpan 길이보다 작거나 ValueSequence같기 때문에 길이를 참조하여 적절한 크기의 버퍼를 확인할 수 있습니다.

추가 정보

적용 대상

CopyString(Span<Char>)

Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs
Source:
Utf8JsonReader.TryGet.cs

현재 JSON 토큰 값을 이스케이프되지 않은 원본에서 UTF-16 문자로 버퍼에 복사합니다.

public:
 int CopyString(Span<char> destination);
public readonly int CopyString(Span<char> destination);
member this.CopyString : Span<char> -> int
Public Function CopyString (destination As Span(Of Char)) As Integer

매개 변수

destination
Span<Char>

코드 변환된 UTF-16자를 쓸 버퍼입니다.

반품

에 기록된 문자 수입니다 destination.

예외

JSON 토큰은 문자열이 아닙니다. 즉, 문자열이 아니거나 PropertyName아닙니다String.

-또는-

JSON 문자열에는 잘못된 UTF-8바이트 또는 잘못된 UTF-16 서로게이트가 포함되어 있습니다.

대상 버퍼가 너무 작아서 이스케이프되지 않은 값을 보유할 수 없습니다.

설명

와 달리 GetString()이 메서드는 .를 지원하지 Null않습니다.

대상 버퍼가 너무 작아서 이스케이프되지 않은 값을 보유할 수 없는 경우 이 메서드가 throw ArgumentException 됩니다. 이스케이프되지 않은 결과는 항상 인코딩된 문자열의 ValueSpan 길이보다 작거나 ValueSequence같기 때문에 길이를 참조하여 적절한 크기의 버퍼를 확인할 수 있습니다.

추가 정보

적용 대상