pock

JsonSerializerFactory extends AbstractSerializerFactory
in package

Selects the serializer used by JSON body helpers.

JMS Serializer is discovered before Symfony Serializer. Set an adapter explicitly to use project-specific configuration.

JsonSerializerFactory::setSerializer(new CallbackSerializerAdapter('json_encode'));
Tags
category

JsonSerializerFactory

Table of Contents

Methods

create()  : SerializerInterface|null
Instantiate first available serializer.
setSerializer()  : void
Override automatic JSON serializer discovery, or pass null to restore it.

Methods

On this page

Search results