ValinorMessageSerializer
in package
implements
MessageSerializer
Read onlyYes
FinalYes
Tags
Table of Contents
Interfaces
Methods
- __construct() : mixed
- deserialize() : object
- Deserializes JSON data to an object of the specified type.
- serialize() : string
- Serializes a message object to a string representation.
Methods
__construct()
public
__construct(TypeRegistry $registry[, MapperBuilder|null $mapperBuilder = null ]) : mixed
Parameters
- $registry : TypeRegistry
- $mapperBuilder : MapperBuilder|null = null
deserialize()
Deserializes JSON data to an object of the specified type.
public
deserialize(string $data, string $type) : object
Type resolution attempts the registry first (type name lookup); if not found, treats $type as a literal class name.
Parameters
- $data : string
- $type : string
Tags
Attributes
- #[NoDiscard]
- #[Override]
Return values
objectserialize()
Serializes a message object to a string representation.
public
serialize(object $message) : string
Parameters
- $message : object
Tags
Attributes
- #[NoDiscard]
- #[Override]