original_string: public function jsonSerialize()
      {
          $out = [];
          foreach ($this as $model) {
              if (!is_object($model)) {
                  continue;
              }
              if ($model instanceof JsonSerializable) {
                  $out[] = $model->jsonSerialize();
              } else {
                  $out[] = (object)(array)$model;
              }
          }
          return $out;
      }
code: public function jsonSerialize()
      {
          $out = [];
          foreach ($this as $model) {
              if (!is_object($model)) {
                  continue;
              }
              if ($model instanceof JsonSerializable) {
                  $out[] = $model->jsonSerialize();
              } else {
                  $out[] = (object)(array)$model;
              }
          }
          return $out;
      }
code_tokens: public function jsonSerialize ( ) { $ out = [ ] ; foreach ( $ this as $ model ) { if ( ! is_object ( $ model ) ) { continue ; } if ( $ model instanceof JsonSerializable ) { $ out [ ] = $ model -> jsonSerialize ( ) ; } else { $ out [ ] = ( object ) ( array ) $ model ; } } return $ out ; }
docstring: Export the Collection as a regular PHP array for Json serialization.
  
  @return array The Collection represented as an array.
docstring_tokens: Export the Collection as a regular PHP array for Json serialization .