public function json($fields = array(), $recursive = true)
    {
        $list = array();
        foreach ($this->getModels() as $model) {
            $list[] = $model->json($fields, $recursive);
        }
        return $list;
    }
public function json($fields = array(), $recursive = true)
    {
        $list = array();
        foreach ($this->getModels() as $model) {
            $list[] = $model->json($fields, $recursive);
        }
        return $list;
    }
public function json ( $ fields = array ( ) , $ recursive = true ) { $ list = array ( ) ; foreach ( $ this -> getModels ( ) as $ model ) { $ list [ ] = $ model -> json ( $ fields , $ recursive ) ; } return $ list ; }
Genera una array lista para usar con json_encode

@param array $fields
@param bool $recursive
@return array
Genera una array lista para usar con json_encode