Appearance
ToObject Method
Definition
- Namespace:
JASE.Extensions - Assembly:
JASE.Primitives.dll
Overloads
| Name | Description |
|---|---|
T ToObject(JsonElement element, JsonSerializerOptions options = null) | Deserialize (materialize) a JsonElement into the requested CLR type. |
object ToObject(JsonElement element, Type type, JsonSerializerOptions options = null) | Deserialize (materialize) a JsonElement into the requested CLR type. |
object ToObject(JsonElement element, Type type, JsonSerializerOptions options = null)
csharp
object ToObject(JsonElement element, Type type, JsonSerializerOptions options = null)Deserialize (materialize) a JsonElement into the requested CLR type.
Parameters
| Name | Description |
|---|---|
element | The JSON element to materialize. |
options | Optional serializer options; when , JASE.Primitives defaults are used. |
type | The destination CLR type. |
Returns
The materialized object, or .
T ToObject(JsonElement element, JsonSerializerOptions options = null)
csharp
T ToObject(JsonElement element, JsonSerializerOptions options = null)Deserialize (materialize) a JsonElement into the requested CLR type.
Type parameters
| Name | Description |
|---|---|
T | The destination CLR type. |
Parameters
| Name | Description |
|---|---|
element | The JSON element to materialize. |
options | Optional serializer options; when , JASE.Primitives defaults are used. |
Returns
The materialized object, or .