Created
December 12, 2013 16:02
-
-
Save jwage/b04f64a786bf31a53317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace OpenSky\Bundle\APIBundle\Serializer; | |
use JMS\Serializer\JsonSerializationVisitor; | |
class ArraySerializationVisitor extends JsonSerializationVisitor | |
{ | |
public function getResult() | |
{ | |
return $this->getRoot(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array_serialization_provider: | |
class: ArraySerializationVisitor | |
arguments: | |
- @jms_serializer.naming_strategy | |
tags: | |
- { name: jms_serializer.serialization_visitor, format: array } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use it without symfony?