code: public function jsonSerialize()
      {
          $json = [];
  
          if (null !== $this->folderid) {
              $json['folderid'] = $this->folderid;
          }
          if (null !== $this->depth) {
              $json['depth'] = $this->depth;
          }
  
          return $json;
      }
docs: Gets all data that should be available in a json representation.
  
  @return array an associative array of the available variables