JsonWorkspace.CreateBuilder Method
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Overloads
| Method | Description |
|---|---|
| CreateBuilder(TElement) | Creates a document builder for building mutable JSON documents from an existing element. |
| CreateBuilder(int, int) | Creates a document builder for building mutable JSON documents. |
CreateBuilder(TElement)
Source: JsonWorkspace.cs
Creates a document builder for building mutable JSON documents from an existing element.
public JsonDocumentBuilder<TMutableElement> CreateBuilder<TElement, TMutableElement>(TElement sourceElement)
where TElement : struct, IJsonElement<TElement>
where TMutableElement : struct, IMutableJsonElement<TMutableElement>
Type Parameters
| Parameter | Description |
|---|---|
TElement |
The type of the source JSON element. |
TMutableElement |
The type of the mutable JSON element to build. |
Parameters
| Name | Type | Description |
|---|---|---|
sourceElement |
TElement |
The source element to build from. |
Returns
JsonDocumentBuilder<TMutableElement>
A document builder for the mutable element type.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
CreateBuilder(int, int)
Source: JsonWorkspace.cs
Creates a document builder for building mutable JSON documents.
public JsonDocumentBuilder<TElement> CreateBuilder<TElement>(int initialCapacity, int initialValueBufferSize)
where TElement : struct, IMutableJsonElement<TElement>
Type Parameters
| Parameter | Description |
|---|---|
TElement |
The type of the mutable JSON element to build. |
Parameters
| Name | Type | Description |
|---|---|---|
initialCapacity |
int |
The initial capacity for the document builder. (optional) |
initialValueBufferSize |
int |
The initial size of the value buffer. (optional) |
Returns
A document builder for the specified element type.
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