소스 검색

added an explaining comment

Johannes M. Schmitt 12 년 전
부모
커밋
888839e029
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Serializer/GenericSerializationVisitor.php

+ 2 - 0
Serializer/GenericSerializationVisitor.php

@@ -84,6 +84,8 @@ abstract class GenericSerializationVisitor extends AbstractVisitor
             $this->root = array();
             $rs = &$this->root;
         } else {
+            // ArrayObject is specially treated by the json_encode function and
+            // serialized to { } while a mere array would be serialized to [].
             $rs = isset($type['params'][1]) ? new \ArrayObject() : array();
         }