Serializer
Extends:
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 |
constructor(serializers: Map<string, SerializerInterface>) |
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 |
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:
Name | Type | Attribute | Description |
serializers | Map<string, SerializerInterface> |
Public Methods
public deserialize(data: *, className: *, format: *, context: *): * source
Override:
SerializerInterface#deserializeParams:
Name | Type | Attribute | Description |
data | * | ||
className | * | ||
format | * |
|
|
context | * |
|
Return:
* |
public serialize(data: *, format: *, context: *): * source
Override:
SerializerInterface#serializeParams:
Name | Type | Attribute | Description |
data | * | ||
format | * | ||
context | * |
Return:
* |
public supportsDeserialize(data: *, className: *, format: *): * source
Params:
Name | Type | Attribute | Description |
data | * | ||
className | * | ||
format | * |
|
Return:
* |
public supportsSerialize(data: *, format: *): * source
Params:
Name | Type | Attribute | Description |
data | * | ||
format | * |
|
Return:
* |