JsonUtility.FromJson method (1 of 4)

Creates an object from JSON.

public static object? FromJson(string json, Type type)
parameter description
json The JSON.
type The type.

Return Value

The object.

Exceptions

exception condition
JsonReaderException The text is not valid JSON.
JsonSerializationException The JSON cannot be deserialized into the specified type.

See Also


JsonUtility.FromJson method (2 of 4)

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.

Return Value

The object.

Exceptions

exception condition
JsonReaderException The text is not valid JSON.
JsonSerializationException The JSON cannot be deserialized into the specified type.

See Also


JsonUtility.FromJson<T> method (3 of 4)

Creates an object from JSON.

public static T FromJson<T>(string json)
parameter description
T The type of object to create.
json The JSON.

Return Value

The object.

Exceptions

exception condition
JsonReaderException The text is not valid JSON.
JsonSerializationException The JSON cannot be deserialized into the specified type.

See Also


JsonUtility.FromJson<T> method (4 of 4)

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.

Return Value

The object.

Exceptions

exception condition
JsonReaderException The text is not valid JSON.
JsonSerializationException The JSON cannot be deserialized into the specified type.

See Also