Home Manual Reference Source Test Repository
public class | source

Serializer

Extends:

SerializerInterface → Serializer

Default serializer.

Meant to aggregate all the application serializers and be used as the main serializer in the application. This means that for serializing a new object, a custom serializer for this one should be done and registered to this serializer.

Test:

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

deserialize(data: *, className: *, format: *, context: *): *

public

serialize(data: *, format: *, context: *): *

public

supportsDeserialize(data: *, className: *, format: *): *

public

supportsSerialize(data: *, format: *): *

Inherited Summary

From class SerializerInterface
public

deserialize(data: *, className: string, format: string, context: *): *

Deserializes data back into an object of the given class.

public

serialize(data: *, format: string, context: *): *

Serializes any data object into and object usable for the backend service.

public

supportsDeserialize(data: *, className: string, format: string): boolean

Checks whether the given class is supported for deserialization by this serializer.

public

supportsSerialize(data: *, format: string): boolean

Checks whether the given class is supported for serialization by this serializer.

Public Constructors

public constructor(serializers: Map<string, SerializerInterface>) source

Params:

NameTypeAttributeDescription
serializers Map<string, SerializerInterface>

Test:

Public Methods

public deserialize(data: *, className: *, format: *, context: *): * source

Override:

SerializerInterface#deserialize

Params:

NameTypeAttributeDescription
data *
className *
format *
  • optional
  • default: null
context *
  • optional
  • default: null

Return:

*

public serialize(data: *, format: *, context: *): * source

Override:

SerializerInterface#serialize

Params:

NameTypeAttributeDescription
data *
format *
context *

Return:

*

public supportsDeserialize(data: *, className: *, format: *): * source

Override:

SerializerInterface#supportsDeserialize

Params:

NameTypeAttributeDescription
data *
className *
format *
  • optional
  • default: null

Return:

*

public supportsSerialize(data: *, format: *): * source

Override:

SerializerInterface#supportsSerialize

Params:

NameTypeAttributeDescription
data *
format *
  • optional
  • default: null

Return:

*