소스 검색

Improve serialization example

Tom Van Looy 12 년 전
부모
커밋
fc3d97591a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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::
 
     $serializer = JMS\Serializer\SerializerBuilder::create()->build();
-    $serializer->serialize($data, 'json');
+    $jsonContent = $serializer->serialize($data, 'json');
+    echo $jsonContent; // or return it in a Response
 
 Documentation
 -------------