Skip to content

How to use the serializer with api platform? #80

Open
@thorau

Description

@thorau

I have an Enity with property "offers":
@Orm\Column(type="json_document", options={"jsonb": true})
Offers is a POPO with an id property that is of type rmsey uuid.

When API-Platform tries to persist the entity, is seems that the uuid cannot be serialized.
What would be the right definition in services.yaml to make the serialization work?

I tried something like this, but it is not working:

dunglas_doctrine_json_odm.serializer:
class: 'Dunglas\DoctrineJsonOdm\Serializer'
arguments:
- ['@api_platform.serializer.normalizer.item', '@dunglas_doctrine_json_odm.normalizer.array', '@dunglas_doctrine_json_odm.normalizer.object']
- ['@serializer.encoder.json']
public: true
autowire: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions