Photon Quantum 3.0.0

Public Member Functions | List of all members
Quantum.Json.ByteArrayConverter Class Reference

Converts byte arrays to and from JSON in a way compatible with the Unity's built-in JSON utility. More...

Inherits JsonConverter.

Public Member Functions

override bool CanConvert (Type objectType)
 Determines whether this converter can convert the specified object type. More...
 
override object ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 Reads the JSON representation of the object. More...
 
override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
 Writes the JSON representation of the object. More...
 

Detailed Description

Converts byte arrays to and from JSON in a way compatible with the Unity's built-in JSON utility.

Member Function Documentation

◆ CanConvert()

override bool Quantum.Json.ByteArrayConverter.CanConvert ( Type  objectType)
inline

Determines whether this converter can convert the specified object type.

Parameters
objectTypeThe type of the object to convert.
Returns
true if the converter can convert the specified object type; otherwise, false.

◆ ReadJson()

override object Quantum.Json.ByteArrayConverter.ReadJson ( JsonReader  reader,
Type  objectType,
object  existingValue,
JsonSerializer  serializer 
)
inline

Reads the JSON representation of the object.

Parameters
readerThe JsonReader to read from.
objectTypeThe type of the object to convert.
existingValueThe existing value of object being read.
serializerThe calling serializer.
Returns
The deserialized object.

◆ WriteJson()

override void Quantum.Json.ByteArrayConverter.WriteJson ( JsonWriter  writer,
object  value,
JsonSerializer  serializer 
)
inline

Writes the JSON representation of the object.

Parameters
writerThe JsonWriter to write to.
valueThe value to write.
serializerThe calling serializer.