Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialize JSON into existing Doctrine entities and empty strings are ignored #417

Closed
knasher opened this issue Mar 19, 2015 · 1 comment

Comments

@knasher
Copy link

knasher commented Mar 19, 2015

I'm attempting to deserialize a JSON object into existing Doctrine entities and where a field in the database contains text it is not overwritten when the same field in the JSON is empty.

The only way at present is to fill any empty strings with a single space which will then be shown in the entity by serializer. Does anyone know why this is and if there is a way around it?

@knasher
Copy link
Author

knasher commented Mar 20, 2015

There was nothing wrong with JMSSerializer rather a custom PreDeserializationSubscriber that was causing the issue. I will close the issue now.

@knasher knasher closed this as completed Mar 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant