Nexus API Reference

ValinorMessageSerializer
in package
implements MessageSerializer

Read onlyYes
FinalYes
Tags
psalm-api

Serializer using JSON encoding and Valinor for type-safe deserialization.

Messages are serialized to JSON using json_encode on their public properties. Deserialization uses Valinor's mapper for strict type reconstruction.

Table of Contents

Interfaces

MessageSerializer

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

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
throws
MessageDeserializationException
Attributes
#[NoDiscard]
#[Override]
Return values
object
On this page

Search results