Permalink
Browse files

Update to JMS Serializer to allow manual override

  • Loading branch information...
1 parent 6c8b173 commit bebb702defe7a6302c2d25415d7a64a4c08369a9 MrHash committed Sep 10, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Doctrine/Search/Serializer/JMSSerializer.php
View
3 lib/Doctrine/Search/Serializer/JMSSerializer.php
@@ -5,6 +5,7 @@
use Doctrine\Search\SerializerInterface;
use JMS\Serializer\SerializerBuilder;
use JMS\Serializer\SerializationContext;
+use JMS\Serializer\Naming\SerializedNameAnnotationStrategy;
use JMS\Serializer\Naming\IdenticalPropertyNamingStrategy;
class JMSSerializer implements SerializerInterface
@@ -16,7 +17,7 @@ public function __construct(SerializationContext $context = null)
{
$this->context = $context;
$this->serializer = SerializerBuilder::create()
- ->setPropertyNamingStrategy(new IdenticalPropertyNamingStrategy())
+ ->setPropertyNamingStrategy(new SerializedNameAnnotationStrategy(new IdenticalPropertyNamingStrategy()))
->addDefaultHandlers()
->build();
}

0 comments on commit bebb702

Please sign in to comment.