Anvil
Anvil.API.JsonUtility Class Reference

Utility methods for serializing/deserializing JSON data. More...

Static Public Member Functions

static ? T FromJson< T > (string json)
 Deserializes a JSON string. More...
 
static string ToJson< T > (T value)
 Serializes a value as JSON. More...
 

Detailed Description

Utility methods for serializing/deserializing JSON data.

Member Function Documentation

◆ FromJson< T >()

static ? T Anvil.API.JsonUtility.FromJson< T > ( string  json)
inlinestatic

Deserializes a JSON string.

Parameters
jsonThe JSON to deserialize.
Template Parameters
TThe type to deserialize to.
Returns
The deserialized object.

◆ ToJson< T >()

static string Anvil.API.JsonUtility.ToJson< T > ( value)
inlinestatic

Serializes a value as JSON.

Parameters
valueThe value to serialize.
Template Parameters
TThe type of the value to serialize.
Returns
A JSON string representing the value.

The documentation for this class was generated from the following file: