JsonProperty<TValue>
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonProperty.cs
Represents a single property for a JSON object.
public readonly struct JsonProperty<TValue>
where TValue : struct, IJsonElement<TValue>
Type Parameters
| Parameter | Description |
|---|---|
TValue |
The type of the value. |
Properties
| Property | Type | Description |
|---|---|---|
| Name | string |
The name of this property. |
| Utf16NameSpan | UnescapedUtf16JsonString |
Gets the name as an unescaped UTF-16 JSON string. |
| Utf8NameSpan | UnescapedUtf8JsonString |
Gets the name as an unescaped UTF-8 JSON string. |
| Value | TValue |
The value of this property. |
Methods
| Method | Description |
|---|---|
| AsJsonElementProperty() | Converts this property to a JsonProperty of JsonElement, preserving the same property name and... |
| NameEquals | Compares text to the name of this property. |
| ToString() | Provides a String representation of the property for debugging purposes. |
| WriteTo(Utf8JsonWriter) | Write the property into the provided writer as a named JSON object property. |
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