Method DeserializeFromJson
DeserializeFromJson(ref Utf8JsonReader, JsonInputOptions)
Creates FieldValue instance from JSON data
represented by Utf8JsonReader.
Declaration
public static FieldValue DeserializeFromJson(ref Utf8JsonReader reader, JsonInputOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonReader | reader | The reader from which the value is read. |
JsonInputOptions | options | (Optional) Options that allow limited
customization of the deserialization process. If not specified or
null , appropriate defaults will be used as described in
JsonInputOptions. |
Returns
Type | Description |
---|---|
FieldValue | FieldValue instance representing JSON data read. |
Remarks
This is an advanced method to optimize performance, using functionality in System.Text.Json namespace. Most applications can use FromJsonString(String, JsonInputOptions). See the remarks section of FieldValue on mappings between JSON types and subclasses of FieldValue.
Note that this method read the value from the current position of represented by Utf8JsonReader. The state of Utf8JsonReader should be managed by the caller.
Exceptions
Type | Condition |
---|---|
ArgumentException | options has
invalid values. |
JsonException | reader has
invalid JSON data. |