Browse Source

Improve serialization example

Tom Van Looy 12 years ago
parent
commit
fc3d97591a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      doc/index.rst

+ 2 - 1
doc/index.rst

@@ -30,7 +30,8 @@ Usage
 For standalone projects usage of the provided builder is encouraged::
 For standalone projects usage of the provided builder is encouraged::
 
 
     $serializer = JMS\Serializer\SerializerBuilder::create()->build();
     $serializer = JMS\Serializer\SerializerBuilder::create()->build();
-    $serializer->serialize($data, 'json');
+    $jsonContent = $serializer->serialize($data, 'json');
+    echo $jsonContent; // or return it in a Response
 
 
 Documentation
 Documentation
 -------------
 -------------