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

Add fos_rest.serializer.serialize_null to control null value serializati... #480

Merged
merged 1 commit into from Jun 19, 2013

Conversation

Projects
None yet
4 participants
@hglattergotz
Contributor

hglattergotz commented Jun 19, 2013

...on

The JMS serializer by default will not serialize keys with a null value.
This new parameter allows control of this behavior via the FOSRestBundle
configuration in app/config/config.yml.
Setting fos_rest.serializer.serialize_null to true will cause the
setSerializeNull() method on the Context object to be called with the
value that is set in the configuration.
Add test case to check that the Context Object has its member
$serializeNull set to the correct value.
Add new parameter to the Resource/doc/configuration-reference.md
documentation file.

Add fos_rest.serializer.serialize_null to control null value serializ…
…ation

The JMS serializer by default will not serialize keys with a null value.
This new parameter allows control of this behavior via the FOSRestBundle
configuration in app/config/config.yml.
Setting fos_rest.serializer.serialize_null to true will cause the
setSerializeNull() method on the Context object to be called with the
value that is set in the configuration.
Add test case to check that the Context Object has its member
$serializeNull set to the correct value.
Add new parameter to the Resource/doc/configuration-reference.md
documentation file.

lsmith77 added a commit that referenced this pull request Jun 19, 2013

Merge pull request #480 from hglattergotz/iss_459
Add fos_rest.serializer.serialize_null to control null value serializati...

@lsmith77 lsmith77 merged commit e290333 into FriendsOfSymfony:master Jun 19, 2013

1 check was pending

default The Travis CI build is in progress
Details
@lsmith77

This comment has been minimized.

Member

lsmith77 commented Jun 19, 2013

thank you!

@hglattergotz hglattergotz deleted the hglattergotz:iss_459 branch Jun 19, 2013

@hglattergotz

This comment has been minimized.

Contributor

hglattergotz commented Jun 19, 2013

Welcome!

@stof

This comment has been minimized.

Member

stof commented Jun 19, 2013

The serializer settings should be nested into view as they are related to the View part of the bundle, not to a separate serialization part

@stof

This comment has been minimized.

Member

stof commented Jun 19, 2013

and it should be exposed through the semantic configuration

@lsmith77

This comment has been minimized.

Member

lsmith77 commented Jun 19, 2013

done here 82e730a

@titomiguelcosta

This comment has been minimized.

titomiguelcosta commented Jun 19, 2013

thanks @lsmith77 now everything is back working, I was having an error: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: "The parameter "fos_rest.serializer.serialize_null" must be defined."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment