JsonSerializer

Overview

The JsonSerializer class represents JSON serializer. This class is used internally by the JsonMessage class to read or write data in the JSON format.

In most cases there is no need to instantiate this class directly.

For internal use only.

Location


 

constructor  protected    (declared in Serializer)

Empty constructor.

 

constructor

 

JsonSerializer()

 

Sub New()

constructor (JsonMessage)

Creates a new instance of the JsonSerializer class.

 

constructor(owner: JsonMessage)

 

JsonSerializer(JsonMessage owner)

 

Sub New(owner As JsonMessage)

Parameters:

  • owner: A message instance that owns the serializer.

BeginReadComplex  protected

 

method BeginReadComplex(name: String; type: Type; out value: ComplexType): Boolean

 

Boolean BeginReadComplex(String name, Type type, out ComplexType value)

 

Function BeginReadComplex(name As String, type As Type, <OutAttribute> ByRef value As ComplexType) As Boolean

Parameters:

  • name:
  • type:
  • value:

BeginReadObject  protected

Initialized the process of reading complex object form the owner owner JsonMessage instance.

 

method BeginReadObject(name: String; type: Type): Object

 

Object BeginReadObject(String name, Type type)

 

Function BeginReadObject(name As String, type As Type) As Object

Parameters:

  • name: Object name
  • type: Object type

BeginWriteComplex  protected

 

method BeginWriteComplex(name: String; value: ComplexType): Boolean

 

Boolean BeginWriteComplex(String name, ComplexType value)

 

Function BeginWriteComplex(name As String, value As ComplexType) As Boolean

Parameters:

  • name:
  • value:

BeginWriteObject  protected

Initialized the process of writing complex object form the owner owner JsonMessage instance.

 

method BeginWriteObject(name: String; value: Object)

 

void BeginWriteObject(String name, Object value)

 

Sub BeginWriteObject(name As String, value As Object)

Parameters:

  • name: Object name
  • value: Object itself

CodeFirstTypeConverters    (declared in Serializer)

 

class property CodeFirstTypeConverters: Dictionary<Type, CodeFirstTypeConverterRegistration> read;

 

class Dictionary<Type, CodeFirstTypeConverterRegistration> CodeFirstTypeConverters { get; }

 

Shared ReadOnly Property CodeFirstTypeConverters() As Dictionary<Type, CodeFirstTypeConverterRegistration>

CreateComplexTypeInstance  protected    (declared in Serializer)

 

method CreateComplexTypeInstance(className: String): ComplexType

 

ComplexType CreateComplexTypeInstance(String className)

 

Function CreateComplexTypeInstance(className As String) As ComplexType

Parameters:

  • className:

EndReadComplex  protected

 

method EndReadComplex

 

void EndReadComplex()

 

Sub EndReadComplex()

EndReadObject  protected

 

method EndReadObject

 

void EndReadObject()

 

Sub EndReadObject()

EndWriteComplex  protected

 

method EndWriteComplex(value: ComplexType)

 

void EndWriteComplex(ComplexType value)

 

Sub EndWriteComplex(value As ComplexType)

Parameters:

  • value:

EndWriteObject  protected

 

method EndWriteObject

 

void EndWriteObject()

 

Sub EndWriteObject()

GetJsonNodeByKey<T>

 

class method GetJsonNodeByKey<T>(obj: JsonBaseObject; key: String): T

 

static T GetJsonNodeByKey<T>(JsonBaseObject obj, String key)

 

Shared Function GetJsonNodeByKey<T>(obj As JsonBaseObject, key As String) As T

Parameters:

  • obj:
  • key:

Read    (declared in Serializer)

The general method for reading that calls specific ReadXXX method dependently on the type of an object to read.

 

method Read(name: String; type: Type; format: StreamingFormat): Object

 

Object Read(String name, Type type, StreamingFormat format)

 

Function Read(name As String, type As Type, format As StreamingFormat) As Object

Parameters:

  • name:
  • type:
  • format:

ReadAnsiString

Reads ANSI string value from the owner JsonMessage instance.

 

method ReadAnsiString(name: String): String

 

String ReadAnsiString(String name)

 

Function ReadAnsiString(name As String) As String

Parameters:

  • name: AnsiString object name

ReadArray

Reads array from the owner owner JsonMessage instance.

 

method ReadArray(name: String; type: Type; format: StreamingFormat): Array

 

Array ReadArray(String name, Type type, StreamingFormat format)

 

Function ReadArray(name As String, type As Type, format As StreamingFormat) As Array

Parameters:

  • name: Array name
  • type: Array elements type
  • format: Array serialization format

ReadBinary

Reads binary value from the owner JsonMessage instance.

 

method ReadBinary(name: String): Binary

 

Binary ReadBinary(String name)

 

Function ReadBinary(name As String) As Binary

Parameters:

  • name: Binary object name

ReadBoolean

Reads boolean value from the owner JsonMessage instance

 

method ReadBoolean(name: String): Boolean

 

Boolean ReadBoolean(String name)

 

Function ReadBoolean(name As String) As Boolean

Parameters:

  • name: Boolean object name

ReadComplex    (declared in Serializer)

 

method ReadComplex(name: String; type: Type): ComplexType

 

ComplexType ReadComplex(String name, Type type)

 

Function ReadComplex(name As String, type As Type) As ComplexType

Parameters:

  • name:
  • type:

ReadCurrency

Reads currency value from the owner JsonMessage instance.

 

method ReadCurrency(name: String): Decimal

 

Decimal ReadCurrency(String name)

 

Function ReadCurrency(name As String) As Decimal

Parameters:

  • name: Currency object name

ReadCustomEnum

Reads ICustomEnum value from the owner JsonMessage instance.

 

method ReadCustomEnum(name: String): ICustomEnum

 

ICustomEnum ReadCustomEnum(String name)

 

Function ReadCustomEnum(name As String) As ICustomEnum

Parameters:

  • name: Enumeration object name

ReadDateTime

Reads DateTime value from the owner JsonMessage instance.

 

method ReadDateTime(name: String): DateTime

 

DateTime ReadDateTime(String name)

 

Function ReadDateTime(name As String) As DateTime

Parameters:

  • name: DateTime object name

ReadDecimal

Reads decimal value from the owner JsonMessage instance.

 

method ReadDecimal(name: String): Decimal

 

Decimal ReadDecimal(String name)

 

Function ReadDecimal(name As String) As Decimal

Parameters:

  • name: Decimal object name

ReadDouble

Reads double value from the owner JsonMessage instance.

 

method ReadDouble(name: String): Double

 

Double ReadDouble(String name)

 

Function ReadDouble(name As String) As Double

Parameters:

  • name: Double object name

ReadEnum

Read enumeration from the owner JsonMessage instance.

 

method ReadEnum(name: String; type: Type): Enum

 

Enum ReadEnum(String name, Type type)

 

Function ReadEnum(name As String, type As Type) As Enum

Parameters:

  • name: Enumeration object name
  • type: Enumeration type

ReadException    (declared in Serializer)

 

method ReadException(type: Type; message: String; isFromServer: Boolean): Exception

 

Exception ReadException(Type type, String message, Boolean isFromServer)

 

Function ReadException(type As Type, message As String, isFromServer As Boolean) As Exception

Parameters:

  • type:
  • message:
  • isFromServer:

ReadFromStream

Reads message data from provided data stream and fills the owner JsonMessage instance.

 

method ReadFromStream(stream: Stream)

 

void ReadFromStream(Stream stream)

 

Sub ReadFromStream(stream As Stream)

Parameters:

  • stream: Source data stream

ReadGenericArray

Reads generic array from the owner JsonMessage instance.

 

method ReadGenericArray(name: String; type: Type; format: StreamingFormat): IList

 

IList ReadGenericArray(String name, Type type, StreamingFormat format)

 

Function ReadGenericArray(name As String, type As Type, format As StreamingFormat) As IList

Parameters:

  • name: Array name
  • type: Array elements type
  • format: Array serialization format

ReadGuid

Reads GUID from the owner JsonMessage instance.

 

method ReadGuid(name: String): Guid

 

Guid ReadGuid(String name)

 

Function ReadGuid(name As String) As Guid

Parameters:

  • name: GUID name

ReadInt32

Reads Int32 value from the owner JsonMessage instance.

 

method ReadInt32(name: String): Int32

 

Int32 ReadInt32(String name)

 

Function ReadInt32(name As String) As Int32

Parameters:

  • name: Int32 name

ReadInt64

Reads Int64 value from the owner JsonMessage instance.

 

method ReadInt64(name: String): Int64

 

Int64 ReadInt64(String name)

 

Function ReadInt64(name As String) As Int64

Parameters:

  • name: Int64 name

ReadNullableBoolean

 

method ReadNullableBoolean(name: String): nullable Boolean

 

Boolean? ReadNullableBoolean(String name)

 

Function ReadNullableBoolean(name As String) As Boolean?

Parameters:

  • name:

ReadNullableCurrency

 

method ReadNullableCurrency(name: String): nullable Decimal

 

Decimal? ReadNullableCurrency(String name)

 

Function ReadNullableCurrency(name As String) As Decimal?

Parameters:

  • name:

ReadNullableDateTime

 

method ReadNullableDateTime(name: String): nullable DateTime

 

DateTime? ReadNullableDateTime(String name)

 

Function ReadNullableDateTime(name As String) As DateTime?

Parameters:

  • name:

ReadNullableDecimal

 

method ReadNullableDecimal(name: String): nullable Decimal

 

Decimal? ReadNullableDecimal(String name)

 

Function ReadNullableDecimal(name As String) As Decimal?

Parameters:

  • name:

ReadNullableDouble

 

method ReadNullableDouble(name: String): nullable Double

 

Double? ReadNullableDouble(String name)

 

Function ReadNullableDouble(name As String) As Double?

Parameters:

  • name:

ReadNullableEnum

 

method ReadNullableEnum(name: String; type: Type): nullable Enum

 

Enum? ReadNullableEnum(String name, Type type)

 

Function ReadNullableEnum(name As String, type As Type) As Enum?

Parameters:

  • name:
  • type:

ReadNullableGuid

 

method ReadNullableGuid(name: String): nullable Guid

 

Guid? ReadNullableGuid(String name)

 

Function ReadNullableGuid(name As String) As Guid?

Parameters:

  • name:

ReadNullableInt32

 

method ReadNullableInt32(name: String): nullable Int32

 

Int32? ReadNullableInt32(String name)

 

Function ReadNullableInt32(name As String) As Int32?

Parameters:

  • name:

ReadNullableInt64

 

method ReadNullableInt64(name: String): nullable Int64

 

Int64? ReadNullableInt64(String name)

 

Function ReadNullableInt64(name As String) As Int64?

Parameters:

  • name:

ReadObject    (declared in Serializer)

 

method ReadObject(name: String; type: Type): Object

 

Object ReadObject(String name, Type type)

 

Function ReadObject(name As String, type As Type) As Object

Parameters:

  • name:
  • type:

ReadObjectData    (declared in Serializer)

 

method ReadObjectData(value: Object)

 

void ReadObjectData(Object value)

 

Sub ReadObjectData(value As Object)

Parameters:

  • value:

ReadUtf8String

Reads string value in UTF8 format from the owner JsonMessage instance.

 

method ReadUtf8String(name: String): String

 

String ReadUtf8String(String name)

 

Function ReadUtf8String(name As String) As String

Parameters:

  • name: Utf8String name

ReadVariant

Reads variant value from the owner JsonMessage instance.

 

method ReadVariant(name: String): Object

 

Object ReadVariant(String name)

 

Function ReadVariant(name As String) As Object

Parameters:

  • name: Variant object name

ReadWideString

Reads WideString value from the owner JsonMessage instance.

 

method ReadWideString(name: String): String

 

String ReadWideString(String name)

 

Function ReadWideString(name As String) As String

Parameters:

  • name: name of WideString object to read

ReadXml

Reads XML node from JsonMessage serialized object and returns it.

 

method ReadXml(name: String): XmlNode

 

XmlNode ReadXml(String name)

 

Function ReadXml(name As String) As XmlNode

Parameters:

  • name: name of Xml object to read

RecordStrictOrder    (declared in Serializer)

Order of complex types fields in which they will be serialized/deserialized. If set to true the order or fields remains the same as in native type. If false, fields will be ordered alphabetically. FALSE by default.

 

property RecordStrictOrder: Boolean read;

 

Boolean RecordStrictOrder { get; }

 

ReadOnly Property RecordStrictOrder() As Boolean

TypeFactory    (declared in Serializer)

When doing custom reading/writing of values, the type factory can be used to provide custom serializable types.

 

property TypeFactory: ITypeFactory read write;

 

ITypeFactory TypeFactory { get; set; }

 

Property TypeFactory() As ITypeFactory

Write (String, Object, StreamingFormat)    (declared in Serializer)

 

method Write(name: String; value: Object; format: StreamingFormat)

 

void Write(String name, Object value, StreamingFormat format)

 

Sub Write(name As String, value As Object, format As StreamingFormat)

Parameters:

  • name:
  • value:
  • format:

Write (String, Object, Type, StreamingFormat)    (declared in Serializer)

The general method for writing that calls specific WriteXXX method dependently on the type of an object to write.

 

method Write(name: String; value: Object; type: Type; format: StreamingFormat)

 

void Write(String name, Object value, Type type, StreamingFormat format)

 

Sub Write(name As String, value As Object, type As Type, format As StreamingFormat)

Parameters:

  • name:
  • value:
  • type:
  • format:

WriteAnsiString

Writes ANSI string object with specified name and value to the output JsonMessage message. If value is null then will written JsonNull object.

 

method WriteAnsiString(name: String; value: String)

 

void WriteAnsiString(String name, String value)

 

Sub WriteAnsiString(name As String, value As String)

Parameters:

  • name: name of the AnsiString object to write
  • value: value of the AnsiString object to write

WriteArray

Writes array to the owner JsonMessage instance..

 

method WriteArray(name: String; value: Array; format: StreamingFormat)

 

void WriteArray(String name, Array value, StreamingFormat format)

 

Sub WriteArray(name As String, value As Array, format As StreamingFormat)

Parameters:

  • name: Array name
  • value: Array itself
  • format: Serialization format

WriteBinary

Writes provided binary value to the owner JsonMessage instance encoded as Base64 string.

 

method WriteBinary(name: String; value: Stream)

 

void WriteBinary(String name, Stream value)

 

Sub WriteBinary(name As String, value As Stream)

Parameters:

  • name: Binary object name
  • value: Binary value

WriteBoolean

Writes provided Boolean value to the owner JsonMessage instance.

 

method WriteBoolean(name: String; value: Boolean)

 

void WriteBoolean(String name, Boolean value)

 

Sub WriteBoolean(name As String, value As Boolean)

Parameters:

  • name: Boolean name
  • value: Boolean value

WriteComplex    (declared in Serializer)

 

method WriteComplex(name: String; value: ComplexType)

 

void WriteComplex(String name, ComplexType value)

 

Sub WriteComplex(name As String, value As ComplexType)

Parameters:

  • name:
  • value:

WriteCurrency

Writes provided currency object to the owner JsonMessage instance.

 

method WriteCurrency(name: String; value: Decimal)

 

void WriteCurrency(String name, Decimal value)

 

Sub WriteCurrency(name As String, value As Decimal)

Parameters:

  • name: Currency object name
  • value: Currency value

WriteCustomEnum

Writes provided enumeration to the owner JsonMessage instance.

 

method WriteCustomEnum(name: String; value: ICustomEnum)

 

void WriteCustomEnum(String name, ICustomEnum value)

 

Sub WriteCustomEnum(name As String, value As ICustomEnum)

Parameters:

  • name: Enumeration name
  • value: Enumeration value

WriteDateTime

Writes provided datetime object to the owner JsonMessage instance.

 

method WriteDateTime(name: String; value: DateTime)

 

void WriteDateTime(String name, DateTime value)

 

Sub WriteDateTime(name As String, value As DateTime)

Parameters:

  • name: DateTime name
  • value: DateTime value

WriteDecimal

Writes provided Decimal to the owner JsonMessage instance.

 

method WriteDecimal(name: String; value: Decimal)

 

void WriteDecimal(String name, Decimal value)

 

Sub WriteDecimal(name As String, value As Decimal)

Parameters:

  • name: Decimal object name
  • value: Decimal value

WriteDouble

Writes provided Double to the owner JsonMessage instance.

 

method WriteDouble(name: String; value: Double)

 

void WriteDouble(String name, Double value)

 

Sub WriteDouble(name As String, value As Double)

Parameters:

  • name: Double object name
  • value: Double value

WriteEnum

Writes provided Enumeration value to the owner JsonMessage instance.

 

method WriteEnum(name: String; value: Enum)

 

void WriteEnum(String name, Enum value)

 

Sub WriteEnum(name As String, value As Enum)

Parameters:

  • name: Enumeration name
  • value: Enumeration value

WriteGenericArray

Writes generic array object with specified name and value to the owner JsonMessage instance.

 

method WriteGenericArray(name: String; value: IList; format: StreamingFormat)

 

void WriteGenericArray(String name, IList value, StreamingFormat format)

 

Sub WriteGenericArray(name As String, value As IList, format As StreamingFormat)

Parameters:

  • name: Array name
  • value: Array object
  • format: Serialization format

WriteGuid

Writes GUID object with specified name and value to the owner JsonMessage instance.

 

method WriteGuid(name: String; value: Guid)

 

void WriteGuid(String name, Guid value)

 

Sub WriteGuid(name As String, value As Guid)

Parameters:

  • name: Guid name
  • value: Guid value

WriteInt32

Writes Int32 object with specified name and value to the owner JsonMessage instance.

 

method WriteInt32(name: String; value: Int32)

 

void WriteInt32(String name, Int32 value)

 

Sub WriteInt32(name As String, value As Int32)

Parameters:

  • name: Int32 name
  • value: Int32 value

WriteInt64

Writes Int64 object with specified name and value to the owner JsonMessage instance.

 

method WriteInt64(name: String; value: Int64)

 

void WriteInt64(String name, Int64 value)

 

Sub WriteInt64(name As String, value As Int64)

Parameters:

  • name: Int64 name
  • value: Int64 value

WriteNullableBoolean

 

method WriteNullableBoolean(name: String; value: Nullable<Boolean>)

 

void WriteNullableBoolean(String name, Nullable<Boolean> value)

 

Sub WriteNullableBoolean(name As String, value As Nullable<Boolean>)

Parameters:

  • name:
  • value:

WriteNullableCurrency

 

method WriteNullableCurrency(name: String; value: Nullable<Decimal>)

 

void WriteNullableCurrency(String name, Nullable<Decimal> value)

 

Sub WriteNullableCurrency(name As String, value As Nullable<Decimal>)

Parameters:

  • name:
  • value:

WriteNullableDateTime

 

method WriteNullableDateTime(name: String; value: Nullable<DateTime>)

 

void WriteNullableDateTime(String name, Nullable<DateTime> value)

 

Sub WriteNullableDateTime(name As String, value As Nullable<DateTime>)

Parameters:

  • name:
  • value:

WriteNullableDecimal

 

method WriteNullableDecimal(name: String; value: Nullable<Decimal>)

 

void WriteNullableDecimal(String name, Nullable<Decimal> value)

 

Sub WriteNullableDecimal(name As String, value As Nullable<Decimal>)

Parameters:

  • name:
  • value:

WriteNullableDouble

 

method WriteNullableDouble(name: String; value: Nullable<Double>)

 

void WriteNullableDouble(String name, Nullable<Double> value)

 

Sub WriteNullableDouble(name As String, value As Nullable<Double>)

Parameters:

  • name:
  • value:

WriteNullableEnum

 

method WriteNullableEnum(name: String; value: nullable Enum)

 

void WriteNullableEnum(String name, Enum? value)

 

Sub WriteNullableEnum(name As String, value As Enum?)

Parameters:

  • name:
  • value:

WriteNullableGuid

 

method WriteNullableGuid(name: String; value: Nullable<Guid>)

 

void WriteNullableGuid(String name, Nullable<Guid> value)

 

Sub WriteNullableGuid(name As String, value As Nullable<Guid>)

Parameters:

  • name:
  • value:

WriteNullableInt32

 

method WriteNullableInt32(name: String; value: Nullable<Int32>)

 

void WriteNullableInt32(String name, Nullable<Int32> value)

 

Sub WriteNullableInt32(name As String, value As Nullable<Int32>)

Parameters:

  • name:
  • value:

WriteNullableInt64

 

method WriteNullableInt64(name: String; value: Nullable<Int64>)

 

void WriteNullableInt64(String name, Nullable<Int64> value)

 

Sub WriteNullableInt64(name As String, value As Nullable<Int64>)

Parameters:

  • name:
  • value:

WriteObject    (declared in Serializer)

This method is a wrapper for Write method. It defines a type and streaming format of passed object.

 

method WriteObject(name: String; value: Object)

 

void WriteObject(String name, Object value)

 

Sub WriteObject(name As String, value As Object)

Parameters:

  • name:
  • value:

WriteObjectData    (declared in Serializer)

 

method WriteObjectData(value: Object)

 

void WriteObjectData(Object value)

 

Sub WriteObjectData(value As Object)

Parameters:

  • value:

WriteToStream

Writes the owner JsonMessage instance to the provided data stream.

 

method WriteToStream(stream: Stream)

 

void WriteToStream(Stream stream)

 

Sub WriteToStream(stream As Stream)

Parameters:

  • stream: Data stream

WriteUtf8String

Writes UTF8 string object with specified name and value to the owner JsonMessage instance.

 

method WriteUtf8String(name: String; value: String)

 

void WriteUtf8String(String name, String value)

 

Sub WriteUtf8String(name As String, value As String)

Parameters:

  • name: Name of the Utf8String value
  • value: Utf8String value

WriteVariant

Writes variant object with specified name and value to the owner JsonMessage instance.

 

method WriteVariant(name: String; value: Object)

 

void WriteVariant(String name, Object value)

 

Sub WriteVariant(name As String, value As Object)

Parameters:

  • name: Name of the Variant value
  • value: Variant value

WriteWideString

Writes wide string object with specified name and value to the owner JsonMessage instance.

 

method WriteWideString(name: String; value: String)

 

void WriteWideString(String name, String value)

 

Sub WriteWideString(name As String, value As String)

Parameters:

  • name: Name of the WideString value
  • value: WideString value

WriteXml

Writes specified Xml node with specified name and value to the owner JsonMessage instance.

 

method WriteXml(name: String; value: XmlNode)

 

void WriteXml(String name, XmlNode value)

 

Sub WriteXml(name As String, value As XmlNode)

Parameters:

  • name: Name of the Xml value
  • value: Xml object

 

RecordStrictOrder    (declared in Serializer)

Order of complex types fields in which they will be serialized/deserialized. If set to true the order or fields remains the same as in native type. If false, fields will be ordered alphabetically. FALSE by default.

 

property RecordStrictOrder: Boolean read;

 

Boolean RecordStrictOrder { get; }

 

ReadOnly Property RecordStrictOrder() As Boolean

TypeFactory    (declared in Serializer)

When doing custom reading/writing of values, the type factory can be used to provide custom serializable types.

 

property TypeFactory: ITypeFactory read write;

 

ITypeFactory TypeFactory { get; set; }

 

Property TypeFactory() As ITypeFactory

CodeFirstTypeConverters    (declared in Serializer)

 

class property CodeFirstTypeConverters: Dictionary<Type, CodeFirstTypeConverterRegistration> read;

 

class Dictionary<Type, CodeFirstTypeConverterRegistration> CodeFirstTypeConverters { get; }

 

Shared ReadOnly Property CodeFirstTypeConverters() As Dictionary<Type, CodeFirstTypeConverterRegistration>

 

GetJsonNodeByKey<T>

 

class method GetJsonNodeByKey<T>(obj: JsonBaseObject; key: String): T

 

static T GetJsonNodeByKey<T>(JsonBaseObject obj, String key)

 

Shared Function GetJsonNodeByKey<T>(obj As JsonBaseObject, key As String) As T

Parameters:

  • obj:
  • key:

 

constructor  protected    (declared in Serializer)

Empty constructor.

 

constructor

 

JsonSerializer()

 

Sub New()

constructor (JsonMessage)

Creates a new instance of the JsonSerializer class.

 

constructor(owner: JsonMessage)

 

JsonSerializer(JsonMessage owner)

 

Sub New(owner As JsonMessage)

Parameters:

  • owner: A message instance that owns the serializer.

BeginReadComplex  protected

 

method BeginReadComplex(name: String; type: Type; out value: ComplexType): Boolean

 

Boolean BeginReadComplex(String name, Type type, out ComplexType value)

 

Function BeginReadComplex(name As String, type As Type, <OutAttribute> ByRef value As ComplexType) As Boolean

Parameters:

  • name:
  • type:
  • value:

BeginReadObject  protected

Initialized the process of reading complex object form the owner owner JsonMessage instance.

 

method BeginReadObject(name: String; type: Type): Object

 

Object BeginReadObject(String name, Type type)

 

Function BeginReadObject(name As String, type As Type) As Object

Parameters:

  • name: Object name
  • type: Object type

BeginWriteComplex  protected

 

method BeginWriteComplex(name: String; value: ComplexType): Boolean

 

Boolean BeginWriteComplex(String name, ComplexType value)

 

Function BeginWriteComplex(name As String, value As ComplexType) As Boolean

Parameters:

  • name:
  • value:

BeginWriteObject  protected

Initialized the process of writing complex object form the owner owner JsonMessage instance.

 

method BeginWriteObject(name: String; value: Object)

 

void BeginWriteObject(String name, Object value)

 

Sub BeginWriteObject(name As String, value As Object)

Parameters:

  • name: Object name
  • value: Object itself

CreateComplexTypeInstance  protected    (declared in Serializer)

 

method CreateComplexTypeInstance(className: String): ComplexType

 

ComplexType CreateComplexTypeInstance(String className)

 

Function CreateComplexTypeInstance(className As String) As ComplexType

Parameters:

  • className:

EndReadComplex  protected

 

method EndReadComplex

 

void EndReadComplex()

 

Sub EndReadComplex()

EndReadObject  protected

 

method EndReadObject

 

void EndReadObject()

 

Sub EndReadObject()

EndWriteComplex  protected

 

method EndWriteComplex(value: ComplexType)

 

void EndWriteComplex(ComplexType value)

 

Sub EndWriteComplex(value As ComplexType)

Parameters:

  • value:

EndWriteObject  protected

 

method EndWriteObject

 

void EndWriteObject()

 

Sub EndWriteObject()

Read    (declared in Serializer)

The general method for reading that calls specific ReadXXX method dependently on the type of an object to read.

 

method Read(name: String; type: Type; format: StreamingFormat): Object

 

Object Read(String name, Type type, StreamingFormat format)

 

Function Read(name As String, type As Type, format As StreamingFormat) As Object

Parameters:

  • name:
  • type:
  • format:

ReadAnsiString

Reads ANSI string value from the owner JsonMessage instance.

 

method ReadAnsiString(name: String): String

 

String ReadAnsiString(String name)

 

Function ReadAnsiString(name As String) As String

Parameters:

  • name: AnsiString object name

ReadArray

Reads array from the owner owner JsonMessage instance.

 

method ReadArray(name: String; type: Type; format: StreamingFormat): Array

 

Array ReadArray(String name, Type type, StreamingFormat format)

 

Function ReadArray(name As String, type As Type, format As StreamingFormat) As Array

Parameters:

  • name: Array name
  • type: Array elements type
  • format: Array serialization format

ReadBinary

Reads binary value from the owner JsonMessage instance.

 

method ReadBinary(name: String): Binary

 

Binary ReadBinary(String name)

 

Function ReadBinary(name As String) As Binary

Parameters:

  • name: Binary object name

ReadBoolean

Reads boolean value from the owner JsonMessage instance

 

method ReadBoolean(name: String): Boolean

 

Boolean ReadBoolean(String name)

 

Function ReadBoolean(name As String) As Boolean

Parameters:

  • name: Boolean object name

ReadComplex    (declared in Serializer)

 

method ReadComplex(name: String; type: Type): ComplexType

 

ComplexType ReadComplex(String name, Type type)

 

Function ReadComplex(name As String, type As Type) As ComplexType

Parameters:

  • name:
  • type:

ReadCurrency

Reads currency value from the owner JsonMessage instance.

 

method ReadCurrency(name: String): Decimal

 

Decimal ReadCurrency(String name)

 

Function ReadCurrency(name As String) As Decimal

Parameters:

  • name: Currency object name

ReadCustomEnum

Reads ICustomEnum value from the owner JsonMessage instance.

 

method ReadCustomEnum(name: String): ICustomEnum

 

ICustomEnum ReadCustomEnum(String name)

 

Function ReadCustomEnum(name As String) As ICustomEnum

Parameters:

  • name: Enumeration object name

ReadDateTime

Reads DateTime value from the owner JsonMessage instance.

 

method ReadDateTime(name: String): DateTime

 

DateTime ReadDateTime(String name)

 

Function ReadDateTime(name As String) As DateTime

Parameters:

  • name: DateTime object name

ReadDecimal

Reads decimal value from the owner JsonMessage instance.

 

method ReadDecimal(name: String): Decimal

 

Decimal ReadDecimal(String name)

 

Function ReadDecimal(name As String) As Decimal

Parameters:

  • name: Decimal object name

ReadDouble

Reads double value from the owner JsonMessage instance.

 

method ReadDouble(name: String): Double

 

Double ReadDouble(String name)

 

Function ReadDouble(name As String) As Double

Parameters:

  • name: Double object name

ReadEnum

Read enumeration from the owner JsonMessage instance.

 

method ReadEnum(name: String; type: Type): Enum

 

Enum ReadEnum(String name, Type type)

 

Function ReadEnum(name As String, type As Type) As Enum

Parameters:

  • name: Enumeration object name
  • type: Enumeration type

ReadException    (declared in Serializer)

 

method ReadException(type: Type; message: String; isFromServer: Boolean): Exception

 

Exception ReadException(Type type, String message, Boolean isFromServer)

 

Function ReadException(type As Type, message As String, isFromServer As Boolean) As Exception

Parameters:

  • type:
  • message:
  • isFromServer:

ReadFromStream

Reads message data from provided data stream and fills the owner JsonMessage instance.

 

method ReadFromStream(stream: Stream)

 

void ReadFromStream(Stream stream)

 

Sub ReadFromStream(stream As Stream)

Parameters:

  • stream: Source data stream

ReadGenericArray

Reads generic array from the owner JsonMessage instance.

 

method ReadGenericArray(name: String; type: Type; format: StreamingFormat): IList

 

IList ReadGenericArray(String name, Type type, StreamingFormat format)

 

Function ReadGenericArray(name As String, type As Type, format As StreamingFormat) As IList

Parameters:

  • name: Array name
  • type: Array elements type
  • format: Array serialization format

ReadGuid

Reads GUID from the owner JsonMessage instance.

 

method ReadGuid(name: String): Guid

 

Guid ReadGuid(String name)

 

Function ReadGuid(name As String) As Guid

Parameters:

  • name: GUID name

ReadInt32

Reads Int32 value from the owner JsonMessage instance.

 

method ReadInt32(name: String): Int32

 

Int32 ReadInt32(String name)

 

Function ReadInt32(name As String) As Int32

Parameters:

  • name: Int32 name

ReadInt64

Reads Int64 value from the owner JsonMessage instance.

 

method ReadInt64(name: String): Int64

 

Int64 ReadInt64(String name)

 

Function ReadInt64(name As String) As Int64

Parameters:

  • name: Int64 name

ReadNullableBoolean

 

method ReadNullableBoolean(name: String): nullable Boolean

 

Boolean? ReadNullableBoolean(String name)

 

Function ReadNullableBoolean(name As String) As Boolean?

Parameters:

  • name:

ReadNullableCurrency

 

method ReadNullableCurrency(name: String): nullable Decimal

 

Decimal? ReadNullableCurrency(String name)

 

Function ReadNullableCurrency(name As String) As Decimal?

Parameters:

  • name:

ReadNullableDateTime

 

method ReadNullableDateTime(name: String): nullable DateTime

 

DateTime? ReadNullableDateTime(String name)

 

Function ReadNullableDateTime(name As String) As DateTime?

Parameters:

  • name:

ReadNullableDecimal

 

method ReadNullableDecimal(name: String): nullable Decimal

 

Decimal? ReadNullableDecimal(String name)

 

Function ReadNullableDecimal(name As String) As Decimal?

Parameters:

  • name:

ReadNullableDouble

 

method ReadNullableDouble(name: String): nullable Double

 

Double? ReadNullableDouble(String name)

 

Function ReadNullableDouble(name As String) As Double?

Parameters:

  • name:

ReadNullableEnum

 

method ReadNullableEnum(name: String; type: Type): nullable Enum

 

Enum? ReadNullableEnum(String name, Type type)

 

Function ReadNullableEnum(name As String, type As Type) As Enum?

Parameters:

  • name:
  • type:

ReadNullableGuid

 

method ReadNullableGuid(name: String): nullable Guid

 

Guid? ReadNullableGuid(String name)

 

Function ReadNullableGuid(name As String) As Guid?

Parameters:

  • name:

ReadNullableInt32

 

method ReadNullableInt32(name: String): nullable Int32

 

Int32? ReadNullableInt32(String name)

 

Function ReadNullableInt32(name As String) As Int32?

Parameters:

  • name:

ReadNullableInt64

 

method ReadNullableInt64(name: String): nullable Int64

 

Int64? ReadNullableInt64(String name)

 

Function ReadNullableInt64(name As String) As Int64?

Parameters:

  • name:

ReadObject    (declared in Serializer)

 

method ReadObject(name: String; type: Type): Object

 

Object ReadObject(String name, Type type)

 

Function ReadObject(name As String, type As Type) As Object

Parameters:

  • name:
  • type:

ReadObjectData    (declared in Serializer)

 

method ReadObjectData(value: Object)

 

void ReadObjectData(Object value)

 

Sub ReadObjectData(value As Object)

Parameters:

  • value:

ReadUtf8String

Reads string value in UTF8 format from the owner JsonMessage instance.

 

method ReadUtf8String(name: String): String

 

String ReadUtf8String(String name)

 

Function ReadUtf8String(name As String) As String

Parameters:

  • name: Utf8String name

ReadVariant

Reads variant value from the owner JsonMessage instance.

 

method ReadVariant(name: String): Object

 

Object ReadVariant(String name)

 

Function ReadVariant(name As String) As Object

Parameters:

  • name: Variant object name

ReadWideString

Reads WideString value from the owner JsonMessage instance.

 

method ReadWideString(name: String): String

 

String ReadWideString(String name)

 

Function ReadWideString(name As String) As String

Parameters:

  • name: name of WideString object to read

ReadXml

Reads XML node from JsonMessage serialized object and returns it.

 

method ReadXml(name: String): XmlNode

 

XmlNode ReadXml(String name)

 

Function ReadXml(name As String) As XmlNode

Parameters:

  • name: name of Xml object to read

Write (String, Object, StreamingFormat)    (declared in Serializer)

 

method Write(name: String; value: Object; format: StreamingFormat)

 

void Write(String name, Object value, StreamingFormat format)

 

Sub Write(name As String, value As Object, format As StreamingFormat)

Parameters:

  • name:
  • value:
  • format:

Write (String, Object, Type, StreamingFormat)    (declared in Serializer)

The general method for writing that calls specific WriteXXX method dependently on the type of an object to write.

 

method Write(name: String; value: Object; type: Type; format: StreamingFormat)

 

void Write(String name, Object value, Type type, StreamingFormat format)

 

Sub Write(name As String, value As Object, type As Type, format As StreamingFormat)

Parameters:

  • name:
  • value:
  • type:
  • format:

WriteAnsiString

Writes ANSI string object with specified name and value to the output JsonMessage message. If value is null then will written JsonNull object.

 

method WriteAnsiString(name: String; value: String)

 

void WriteAnsiString(String name, String value)

 

Sub WriteAnsiString(name As String, value As String)

Parameters:

  • name: name of the AnsiString object to write
  • value: value of the AnsiString object to write

WriteArray

Writes array to the owner JsonMessage instance..

 

method WriteArray(name: String; value: Array; format: StreamingFormat)

 

void WriteArray(String name, Array value, StreamingFormat format)

 

Sub WriteArray(name As String, value As Array, format As StreamingFormat)

Parameters:

  • name: Array name
  • value: Array itself
  • format: Serialization format

WriteBinary

Writes provided binary value to the owner JsonMessage instance encoded as Base64 string.

 

method WriteBinary(name: String; value: Stream)

 

void WriteBinary(String name, Stream value)

 

Sub WriteBinary(name As String, value As Stream)

Parameters:

  • name: Binary object name
  • value: Binary value

WriteBoolean

Writes provided Boolean value to the owner JsonMessage instance.

 

method WriteBoolean(name: String; value: Boolean)

 

void WriteBoolean(String name, Boolean value)

 

Sub WriteBoolean(name As String, value As Boolean)

Parameters:

  • name: Boolean name
  • value: Boolean value

WriteComplex    (declared in Serializer)

 

method WriteComplex(name: String; value: ComplexType)

 

void WriteComplex(String name, ComplexType value)

 

Sub WriteComplex(name As String, value As ComplexType)

Parameters:

  • name:
  • value:

WriteCurrency

Writes provided currency object to the owner JsonMessage instance.

 

method WriteCurrency(name: String; value: Decimal)

 

void WriteCurrency(String name, Decimal value)

 

Sub WriteCurrency(name As String, value As Decimal)

Parameters:

  • name: Currency object name
  • value: Currency value

WriteCustomEnum

Writes provided enumeration to the owner JsonMessage instance.

 

method WriteCustomEnum(name: String; value: ICustomEnum)

 

void WriteCustomEnum(String name, ICustomEnum value)

 

Sub WriteCustomEnum(name As String, value As ICustomEnum)

Parameters:

  • name: Enumeration name
  • value: Enumeration value

WriteDateTime

Writes provided datetime object to the owner JsonMessage instance.

 

method WriteDateTime(name: String; value: DateTime)

 

void WriteDateTime(String name, DateTime value)

 

Sub WriteDateTime(name As String, value As DateTime)

Parameters:

  • name: DateTime name
  • value: DateTime value

WriteDecimal

Writes provided Decimal to the owner JsonMessage instance.

 

method WriteDecimal(name: String; value: Decimal)

 

void WriteDecimal(String name, Decimal value)

 

Sub WriteDecimal(name As String, value As Decimal)

Parameters:

  • name: Decimal object name
  • value: Decimal value

WriteDouble

Writes provided Double to the owner JsonMessage instance.

 

method WriteDouble(name: String; value: Double)

 

void WriteDouble(String name, Double value)

 

Sub WriteDouble(name As String, value As Double)

Parameters:

  • name: Double object name
  • value: Double value

WriteEnum

Writes provided Enumeration value to the owner JsonMessage instance.

 

method WriteEnum(name: String; value: Enum)

 

void WriteEnum(String name, Enum value)

 

Sub WriteEnum(name As String, value As Enum)

Parameters:

  • name: Enumeration name
  • value: Enumeration value

WriteGenericArray

Writes generic array object with specified name and value to the owner JsonMessage instance.

 

method WriteGenericArray(name: String; value: IList; format: StreamingFormat)

 

void WriteGenericArray(String name, IList value, StreamingFormat format)

 

Sub WriteGenericArray(name As String, value As IList, format As StreamingFormat)

Parameters:

  • name: Array name
  • value: Array object
  • format: Serialization format

WriteGuid

Writes GUID object with specified name and value to the owner JsonMessage instance.

 

method WriteGuid(name: String; value: Guid)

 

void WriteGuid(String name, Guid value)

 

Sub WriteGuid(name As String, value As Guid)

Parameters:

  • name: Guid name
  • value: Guid value

WriteInt32

Writes Int32 object with specified name and value to the owner JsonMessage instance.

 

method WriteInt32(name: String; value: Int32)

 

void WriteInt32(String name, Int32 value)

 

Sub WriteInt32(name As String, value As Int32)

Parameters:

  • name: Int32 name
  • value: Int32 value

WriteInt64

Writes Int64 object with specified name and value to the owner JsonMessage instance.

 

method WriteInt64(name: String; value: Int64)

 

void WriteInt64(String name, Int64 value)

 

Sub WriteInt64(name As String, value As Int64)

Parameters:

  • name: Int64 name
  • value: Int64 value

WriteNullableBoolean

 

method WriteNullableBoolean(name: String; value: Nullable<Boolean>)

 

void WriteNullableBoolean(String name, Nullable<Boolean> value)

 

Sub WriteNullableBoolean(name As String, value As Nullable<Boolean>)

Parameters:

  • name:
  • value:

WriteNullableCurrency

 

method WriteNullableCurrency(name: String; value: Nullable<Decimal>)

 

void WriteNullableCurrency(String name, Nullable<Decimal> value)

 

Sub WriteNullableCurrency(name As String, value As Nullable<Decimal>)

Parameters:

  • name:
  • value:

WriteNullableDateTime

 

method WriteNullableDateTime(name: String; value: Nullable<DateTime>)

 

void WriteNullableDateTime(String name, Nullable<DateTime> value)

 

Sub WriteNullableDateTime(name As String, value As Nullable<DateTime>)

Parameters:

  • name:
  • value:

WriteNullableDecimal

 

method WriteNullableDecimal(name: String; value: Nullable<Decimal>)

 

void WriteNullableDecimal(String name, Nullable<Decimal> value)

 

Sub WriteNullableDecimal(name As String, value As Nullable<Decimal>)

Parameters:

  • name:
  • value:

WriteNullableDouble

 

method WriteNullableDouble(name: String; value: Nullable<Double>)

 

void WriteNullableDouble(String name, Nullable<Double> value)

 

Sub WriteNullableDouble(name As String, value As Nullable<Double>)

Parameters:

  • name:
  • value:

WriteNullableEnum

 

method WriteNullableEnum(name: String; value: nullable Enum)

 

void WriteNullableEnum(String name, Enum? value)

 

Sub WriteNullableEnum(name As String, value As Enum?)

Parameters:

  • name:
  • value:

WriteNullableGuid

 

method WriteNullableGuid(name: String; value: Nullable<Guid>)

 

void WriteNullableGuid(String name, Nullable<Guid> value)

 

Sub WriteNullableGuid(name As String, value As Nullable<Guid>)

Parameters:

  • name:
  • value:

WriteNullableInt32

 

method WriteNullableInt32(name: String; value: Nullable<Int32>)

 

void WriteNullableInt32(String name, Nullable<Int32> value)

 

Sub WriteNullableInt32(name As String, value As Nullable<Int32>)

Parameters:

  • name:
  • value:

WriteNullableInt64

 

method WriteNullableInt64(name: String; value: Nullable<Int64>)

 

void WriteNullableInt64(String name, Nullable<Int64> value)

 

Sub WriteNullableInt64(name As String, value As Nullable<Int64>)

Parameters:

  • name:
  • value:

WriteObject    (declared in Serializer)

This method is a wrapper for Write method. It defines a type and streaming format of passed object.

 

method WriteObject(name: String; value: Object)

 

void WriteObject(String name, Object value)

 

Sub WriteObject(name As String, value As Object)

Parameters:

  • name:
  • value:

WriteObjectData    (declared in Serializer)

 

method WriteObjectData(value: Object)

 

void WriteObjectData(Object value)

 

Sub WriteObjectData(value As Object)

Parameters:

  • value:

WriteToStream

Writes the owner JsonMessage instance to the provided data stream.

 

method WriteToStream(stream: Stream)

 

void WriteToStream(Stream stream)

 

Sub WriteToStream(stream As Stream)

Parameters:

  • stream: Data stream

WriteUtf8String

Writes UTF8 string object with specified name and value to the owner JsonMessage instance.

 

method WriteUtf8String(name: String; value: String)

 

void WriteUtf8String(String name, String value)

 

Sub WriteUtf8String(name As String, value As String)

Parameters:

  • name: Name of the Utf8String value
  • value: Utf8String value

WriteVariant

Writes variant object with specified name and value to the owner JsonMessage instance.

 

method WriteVariant(name: String; value: Object)

 

void WriteVariant(String name, Object value)

 

Sub WriteVariant(name As String, value As Object)

Parameters:

  • name: Name of the Variant value
  • value: Variant value

WriteWideString

Writes wide string object with specified name and value to the owner JsonMessage instance.

 

method WriteWideString(name: String; value: String)

 

void WriteWideString(String name, String value)

 

Sub WriteWideString(name As String, value As String)

Parameters:

  • name: Name of the WideString value
  • value: WideString value

WriteXml

Writes specified Xml node with specified name and value to the owner JsonMessage instance.

 

method WriteXml(name: String; value: XmlNode)

 

void WriteXml(String name, XmlNode value)

 

Sub WriteXml(name As String, value As XmlNode)

Parameters:

  • name: Name of the Xml value
  • value: Xml object