import AbstractSerializer from 'serializerjs/src/Serializer/AbstractSerializer.js'AbstractSerializer
Extends:
Base class that can be used for writing a custom serializer. It is especially convenient if your serializer do only serialization or only deserialization. If not, it you are better off implementing SerializerAwareInterface or SerializerInterface.
Test:
Method Summary
| Public Methods | ||
| public |
deserialize(data: *, className: *, format: *, context: *): * |
|
| public |
serialize(data: *, format: *, context: *): * |
|
| public |
supportsDeserialize(data: *, className: *, format: *): boolean |
|
| public |
supportsSerialize(data: *, format: *): boolean |
|
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. |
|
| From class SerializerAware | ||
| protected |
|
|
| public |
setSerializer(serializer: 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: *): boolean source
Params:
| Name | Type | Attribute | Description |
| data | * | ||
| className | * | ||
| format | * |
|