ValuelessJsonDocument<T>.TryFormat Method
Definition
Namespace: Corvus.Text.Json.Internal
Assembly: Corvus.Text.Json.dll
Overloads
| Method | Description |
|---|---|
| TryFormat(int, Span<char>, int, ReadOnlySpan<char>, IFormatProvider?) | Tries to format the value into a character span. |
| TryFormat(int, Span<byte>, int, ReadOnlySpan<char>, IFormatProvider?) | Tries to format the value into a UTF-8 byte span. |
TryFormat(int, Span<char>, int, ReadOnlySpan<char>, IFormatProvider?)
Source: ValuelessJsonDocument.cs
Tries to format the value into a character span.
public bool TryFormat(int index, Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? formatProvider)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The element index (always 0). |
destination |
Span<char> |
The destination span. |
charsWritten |
int |
The number of characters written. |
format |
ReadOnlySpan<char> |
The format (ignored). |
formatProvider |
IFormatProvider? |
The format provider (ignored). |
Returns
true if formatting succeeded.
Implements
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
TryFormat(int, Span<byte>, int, ReadOnlySpan<char>, IFormatProvider?)
Source: ValuelessJsonDocument.cs
Tries to format the value into a UTF-8 byte span.
public bool TryFormat(int index, Span<byte> destination, out int bytesWritten, ReadOnlySpan<char> format, IFormatProvider? formatProvider)
Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
The element index (always 0). |
destination |
Span<byte> |
The destination span. |
bytesWritten |
int |
The number of bytes written. |
format |
ReadOnlySpan<char> |
The format (ignored). |
formatProvider |
IFormatProvider? |
The format provider (ignored). |
Returns
true if formatting succeeded.
Implements
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue