Table of Contents
Handles serializing and deserializing models in a way that utilizes their actual constructors
public static class ModelSerializer
Inheritance System.Object ModelSerializer
Recreates a model from serialized JSON, attempting to exactly recreate its types and references
public static object DeserializeModel(JObject jObject, System.Type type);
jObject
Newtonsoft.Json.Linq.JObject
Serialized model JSON
type
System.Type
The type of Model to deserialize this as
Recreates a model from serialized JSON, attempting to exactly recreate its types and references
public static T DeserializeModel<T>(JObject jObject)
where T : Model;
T
The type of Model to deserialize this as
jObject
Newtonsoft.Json.Linq.JObject
Serialized model JSON
Recreates a model from serialized JSON, attempting to exactly recreate its types and references
public static T DeserializeModel<T>(string text)
where T : Model;
T
The type of Model to deserialize this as
text
System.String
Serialized model JSON string
Serializes a model to JSON, preserving types and references
public static string SerializeModel(Model model);
model
Il2CppAssets.Scripts.Models.Model