Member group
SerializeToUtf8Bytes
Declaring type: JsonSerializer
Module: System.Data.Json
Assembly: System.Data.dll
Source file: JsonSerializer.rvn
Overloads / Variants
SerializeToUtf8Bytes
static func SerializeToUtf8Bytes(value: object, options: JsonSerializerOptions) -> Result<byte[], JsonError>
Source file: JsonSerializer.rvn
Serializes an object or JSON node directly into owned UTF-8 bytes with selected formatting.
Parameters
| Name | Type | Description |
|---|---|---|
value |
Object | The supported object or JSON node. |
options |
JsonSerializerOptions | Output formatting, included in the document byte limit. |
Return value
A newly owned JSON array or a mapping, validation or quota error.
Remarks
All validation completes before returning. The caller owns the returned bytes.
SerializeToUtf8Bytes
static func SerializeToUtf8Bytes(value: object) -> Result<byte[], JsonError>
Source file: JsonSerializer.rvn
Serializes an object or JSON node directly into owned UTF-8 bytes.
Parameters
| Name | Type | Description |
|---|---|---|
value |
Object | The supported object or JSON node. |
Return value
A newly owned compact JSON array or a mapping, validation or quota error.
Remarks
The 1024-byte document, 32-value and four-level depth limits apply. No document string is created.