Creates an object from JSON.
public static object? FromJson(string json, Type type)
parameter | description |
---|---|
json | The JSON. |
type | The type. |
The object.
exception | condition |
---|---|
JsonReaderException | The text is not valid JSON. |
JsonSerializationException | The JSON cannot be deserialized into the specified type. |
Creates an object from JSON.
public static object? FromJson(string json, Type type, JsonSettings? settings)
parameter | description |
---|---|
json | The JSON. |
type | The type. |
settings | The settings. |
The object.
exception | condition |
---|---|
JsonReaderException | The text is not valid JSON. |
JsonSerializationException | The JSON cannot be deserialized into the specified type. |
Creates an object from JSON.
public static T FromJson<T>(string json)
parameter | description |
---|---|
T | The type of object to create. |
json | The JSON. |
The object.
exception | condition |
---|---|
JsonReaderException | The text is not valid JSON. |
JsonSerializationException | The JSON cannot be deserialized into the specified type. |
Creates an object from JSON.
public static T FromJson<T>(string json, JsonSettings? settings)
parameter | description |
---|---|
T | The type of object to create. |
json | The JSON. |
settings | The settings. |
The object.
exception | condition |
---|---|
JsonReaderException | The text is not valid JSON. |
JsonSerializationException | The JSON cannot be deserialized into the specified type. |