Share via


JsonValueReaderWriter.FromJson(Utf8JsonReaderManager, Object) Method

Definition

Reads the value from a UTF8 JSON stream or buffer.

public abstract object FromJson (ref Microsoft.EntityFrameworkCore.Storage.Json.Utf8JsonReaderManager manager, object? existingObject = default);
abstract member FromJson : Utf8JsonReaderManager * obj -> obj
Public MustOverride Function FromJson (ByRef manager As Utf8JsonReaderManager, Optional existingObject As Object = Nothing) As Object

Parameters

manager
Utf8JsonReaderManager

The Utf8JsonReaderManager for the JSON being read.

existingObject
Object

Can be used to update an existing object, rather than create a new one.

Returns

The read value.

Remarks

The CurrentReader is at the node that contains the value to be read. The value should be read as appropriate from the JSON, and then further converted as necessary.

Nulls are handled externally to this reader. That is, this method will never be called if the JSON value is "null".

In most cases, the value is represented in the JSON document as a simple property value--e.g. a number, boolean, or string. However, it could be an array or sub-document. In this case, the Utf8JsonReaderManager should be used to parse the JSON as appropriate.

Applies to