Beamable SDK
Public Types | Public Member Functions | Protected Member Functions | Properties | List of all members
Beamable.Serialization.JsonSerializable.JsonSaveStream Class Reference

Class JsonSaveStream is an IStreamSerializer for JsonSerializable Provides serialization of ISerializable objects to json strings More...

Inheritance diagram for Beamable.Serialization.JsonSerializable.JsonSaveStream:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Serialization.JsonSerializable.JsonSaveStream:
Collaboration graph
[legend]

Public Types

enum  JsonType { None , Array , Object }
 

Public Member Functions

void Init (JsonType jsonType=JsonType.None)
 
void Conclude ()
 
override string ToString ()
 
override void OnRecycle ()
 
object GetValue (string key)
 
bool HasKey (string key)
 
void SetValue (string key, object value)
 
bool Serialize (string key, ref IDictionary< string, object > target)
 
bool Serialize (string key, ref bool target)
 
bool Serialize (string key, ref bool? target)
 
bool Serialize (string key, ref int target)
 
bool Serialize (string key, ref int? target)
 
bool Serialize (string key, ref long target)
 
bool Serialize (string key, ref long? target)
 
bool Serialize (string key, ref ulong target)
 
bool Serialize (string key, ref ulong? target)
 
bool Serialize (string key, ref float target)
 
bool Serialize (string key, ref float? target)
 
bool Serialize (string key, ref double target)
 
bool Serialize (string key, ref double? target)
 
bool Serialize (string key, ref string target)
 
bool Serialize (string key, ref StringBuilder target)
 
bool Serialize (string key, ref DateTime target)
 
bool Serialize (string key, ref Rect target)
 
bool Serialize (string key, ref Vector2 target)
 
bool Serialize (string key, ref Vector3 target)
 
bool Serialize (string key, ref Vector4 target)
 
bool Serialize (string key, ref Color target)
 
bool Serialize (string key, ref Quaternion target)
 
bool Serialize (string key, ref Gradient target)
 
bool SerializeDictionary< T > (string key, ref Dictionary< string, T > target)
 
bool SerializeInline< T > (string key, ref T value)
 
bool Serialize< T > (string key, ref T value)
 
bool SerializeList< TList > (string key, ref TList value)
 
bool SerializeILL< T > (string key, ref LinkedList< T > list)
 
bool SerializeArray< T > (string key, ref T[] value)
 
- Public Member Functions inherited from Beamable.Pooling.ClassPool< JsonSaveStream >
void Recycle ()
 
void Dispose ()
 

Protected Member Functions

void StartObject ()
 
void TrimComma ()
 
void EndObject ()
 
void AppendSeperator ()
 
void StartArray ()
 
void EndArray ()
 
void AppendKey (string key)
 
void AppendNull ()
 
void AppendBooleanValue (bool value)
 
void AppendValueUsingStringBuilder< T > (T val)
 
void AppendNumericValue (ulong number)
 
void AppendNumericValue (long number)
 
void AppendNumericValue (uint number)
 
void AppendNumericValue (int number)
 
void AppendNumericValue (ushort number)
 
void AppendNumericValue (short number)
 
void AppendNumericValue (byte number)
 
void AppendNumericValue (float number)
 
void AppendNumericValue (double number)
 
void AppendStringValue (string value)
 
void AppendStringValue (StringBuilder value)
 
void AppendEscapedCharacter (char c)
 

Properties

StringBuilder InternalStringBuilder [get]
 
bool isSaving [get]
 
bool isLoading [get]
 
ListMode Mode [get]
 
- Properties inherited from Beamable.Serialization.JsonSerializable.IStreamSerializer
bool isSaving [get]
 
bool isLoading [get]
 
JsonSerializable.ListMode Mode [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Beamable.Pooling.ClassPool< JsonSaveStream >
static void ClearList (LinkedList< T > list)
 
static T Spawn ()
 
static void Recycle (ClassPool< T > obj)
 
static void Preallocate (int count)
 
- Public Attributes inherited from Beamable.Pooling.ClassPool< JsonSaveStream >
LinkedListNode< T > poolNode
 
- Static Public Attributes inherited from Beamable.Pooling.ClassPool< JsonSaveStream >
static LinkedList< T > free
 

Detailed Description

Class JsonSaveStream is an IStreamSerializer for JsonSerializable Provides serialization of ISerializable objects to json strings

Member Function Documentation

◆ GetValue()

object Beamable.Serialization.JsonSerializable.JsonSaveStream.GetValue ( string  key)
inline

◆ HasKey()

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.HasKey ( string  key)
inline

◆ OnRecycle()

override void Beamable.Serialization.JsonSerializable.JsonSaveStream.OnRecycle ( )
inlinevirtual

◆ Serialize() [1/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref bool  target 
)
inline

◆ Serialize() [2/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref bool?  target 
)
inline

◆ Serialize() [3/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref Color  target 
)
inline

◆ Serialize() [4/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref DateTime  target 
)
inline

◆ Serialize() [5/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref double  target 
)
inline

◆ Serialize() [6/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref double?  target 
)
inline

◆ Serialize() [7/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref float  target 
)
inline

◆ Serialize() [8/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref float?  target 
)
inline

◆ Serialize() [9/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref Gradient  target 
)
inline

◆ Serialize() [10/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref IDictionary< string, object >  target 
)
inline

◆ Serialize() [11/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref int  target 
)
inline

◆ Serialize() [12/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref int?  target 
)
inline

◆ Serialize() [13/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref long  target 
)
inline

◆ Serialize() [14/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref long?  target 
)
inline

◆ Serialize() [15/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref Quaternion  target 
)
inline

◆ Serialize() [16/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref Rect  target 
)
inline

◆ Serialize() [17/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref string  target 
)
inline

◆ Serialize() [18/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref StringBuilder  target 
)
inline

◆ Serialize() [19/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref ulong  target 
)
inline

◆ Serialize() [20/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref ulong?  target 
)
inline

◆ Serialize() [21/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref Vector2  target 
)
inline

◆ Serialize() [22/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref Vector3  target 
)
inline

◆ Serialize() [23/23]

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize ( string  key,
ref Vector4  target 
)
inline

◆ Serialize< T >()

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.Serialize< T > ( string  key,
ref T  value 
)
inline

Implements Beamable.Serialization.JsonSerializable.IStreamSerializer.

Type Constraints
T :class 
T :ISerializable 
T :new() 

◆ SerializeArray< T >()

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.SerializeArray< T > ( string  key,
ref T[]  value 
)
inline

◆ SerializeDictionary< T >()

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.SerializeDictionary< T > ( string  key,
ref Dictionary< string, T >  target 
)
inline

◆ SerializeILL< T >()

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.SerializeILL< T > ( string  key,
ref LinkedList< T >  list 
)
inline

Implements Beamable.Serialization.JsonSerializable.IStreamSerializer.

Type Constraints
T :ClassPool<T> 
T :new() 

◆ SerializeInline< T >()

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.SerializeInline< T > ( string  key,
ref T  value 
)
inline

Implements Beamable.Serialization.JsonSerializable.IStreamSerializer.

Type Constraints
T :ISerializable 

◆ SerializeList< TList >()

bool Beamable.Serialization.JsonSerializable.JsonSaveStream.SerializeList< TList > ( string  key,
ref TList  value 
)
inline

Implements Beamable.Serialization.JsonSerializable.IStreamSerializer.

Type Constraints
TList :IList 
TList :new() 

◆ SetValue()

void Beamable.Serialization.JsonSerializable.JsonSaveStream.SetValue ( string  key,
object  value 
)
inline

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