We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm using fos_rest & jms_serializer bundles to have some joy while building an api with symfony.
Depending on the setting fos_rest.serializer.serialize_null = (true|false) this structure...
$result = array(); $result["data"] = array(0, 1, NULL); $result["more_data"] = NULL
... is going to be jsonized ...
/* fos_rest.serializer.serialize_null = true */ /* where is 3rd value in data ???? */ { "data": [ 0, 1 ], "more_data": null }
... or ...
/* fos_rest.serializer.serialize_null = false */ { "data": [ 0, 1 ] } }
How comes null values in an array are removed from serialized result?
The controller code I'm using right now is this:
$result = array(); $result["data"] = array(0, 1, NULL); $result["more_data"] = null; $serialization_groups = array("public", "me"); $context = new SerializationContext(); $context->setGroups($serialization_groups); $view = FOSView::create() ->setData($result) ->setSerializationContext($context); return $this->get('fos_rest.view_handler')->handle($view);
The text was updated successfully, but these errors were encountered:
Sorry for the loooong feedback look, this has been solved with schmittjoh/serializer#660
Sorry, something went wrong.
No branches or pull requests
Hello,
I'm using fos_rest & jms_serializer bundles to have some joy while building an api with symfony.
Depending on the setting fos_rest.serializer.serialize_null = (true|false) this structure...
... is going to be jsonized ...
... or ...
How comes null values in an array are removed from serialized result?
The controller code I'm using right now is this:
The text was updated successfully, but these errors were encountered: