Generic Deserializing : JSON ID value -> Object

What I’m using:

I’m using the JMSSerializerBundle to deserialize my JSON object from a POST request.

Description of the problem:

One of the vaules in my JSON is an Id. I’d like to replace this Id with the correct object before the deserialization occurs.

Unfortunately, JMSSerializerBundle does not have a @preDeserializer annotation.

The problem I’m facing (and that I would have faced if there was an @preDeserializer annotation anyway) is that I would like to create a generic function for all my entities.


How do I replace my Id with the corresponding object in the most generic way possible ?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s