Nexus API Reference

ValinorJsonSerializer
in package
implements MessageSerializer

Read onlyYes
FinalYes
Tags
psalm-api

Direct-class JSON serializer using Valinor. Unlike ValinorMessageSerializer, this one takes the target class FQCN directly — no TypeRegistry lookup — so it's the right fit for HTTP body decoding via #[FromBody], where the param's class type IS the target.

Encode uses json_encode on public readonly properties. Decode uses Valinor's mapper for strict type reconstruction (constructor promotion, variant unions, enum coercion, etc).

Table of Contents

Interfaces

MessageSerializer

Methods

__construct()  : mixed
deserialize()  : object
Deserializes a string representation back into a message object.
serialize()  : string
Serializes a message object to a string representation.

Methods

__construct()

public __construct([MapperBuilder|null $mapperBuilder = null ]) : mixed
Parameters
$mapperBuilder : MapperBuilder|null = null

        
On this page

Search results