Quantum 3 3.0.3

Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Quantum.Json.UnityContractResolver Class Reference

Custom contract resolver for Unity objects. The main purpose is to support Unity's SerializeReference attribute. More...

Inherits DefaultContractResolver.

Public Member Functions

 UnityContractResolver ()
 Initializes a new instance of the UnityContractResolver class. More...
 

Public Attributes

readonly List< int > SerializedReferences = new()
 List of all known serialize reference ids. More...
 

Protected Member Functions

override JsonArrayContract CreateArrayContract (Type objectType)
 
override JsonContract CreateContract (Type objectType)
 
override JsonObjectContract CreateObjectContract (Type objectType)
 
override IList< JsonProperty > CreateProperties (Type type, MemberSerialization memberSerialization)
 
override JsonProperty CreateProperty (MemberInfo member, MemberSerialization memberSerialization)
 
override List< MemberInfo > GetSerializableMembers (Type objectType)
 

Properties

bool HadNullReference [get]
 Returns true if there has been a null reference for a field marked with SerializeReference. More...
 

Detailed Description

Custom contract resolver for Unity objects. The main purpose is to support Unity's SerializeReference attribute.

Constructor & Destructor Documentation

◆ UnityContractResolver()

Quantum.Json.UnityContractResolver.UnityContractResolver ( )
inline

Initializes a new instance of the UnityContractResolver class.

Member Data Documentation

◆ SerializedReferences

readonly List<int> Quantum.Json.UnityContractResolver.SerializedReferences = new()

List of all known serialize reference ids.

Property Documentation

◆ HadNullReference

bool Quantum.Json.UnityContractResolver.HadNullReference
get

Returns true if there has been a null reference for a field marked with SerializeReference.