Model/Category.php
public function jsonSerialize()
    {
        $json = [];

        if (null !== $this->mediaTypeId) {
            $json['mediaTypeId'] = $this->mediaTypeId;
        }
        if (null !== $this->description) {
            $json['description'] = $this->description;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->deleted) {
            $json['deleted'] = $this->deleted;
        }
        if (null !== $this->properties && !empty($this->properties)) {
            $json['properties'] = $this->properties;
        }
        if (null !== $this->typeId) {
            $json['typeId'] = $this->typeId;
        }

        return $json;
    }
public function jsonSerialize()
    {
        $json = [];

        if (null !== $this->mediaTypeId) {
            $json['mediaTypeId'] = $this->mediaTypeId;
        }
        if (null !== $this->description) {
            $json['description'] = $this->description;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->deleted) {
            $json['deleted'] = $this->deleted;
        }
        if (null !== $this->properties && !empty($this->properties)) {
            $json['properties'] = $this->properties;
        }
        if (null !== $this->typeId) {
            $json['typeId'] = $this->typeId;
        }

        return $json;
    }
public function jsonSerialize ( ) { $ json = [ ] ; if ( null !== $ this -> mediaTypeId ) { $ json [ 'mediaTypeId' ] = $ this -> mediaTypeId ; } if ( null !== $ this -> description ) { $ json [ 'description' ] = $ this -> description ; } if ( null !== $ this -> name ) { $ json [ 'name' ] = $ this -> name ; } if ( null !== $ this -> deleted ) { $ json [ 'deleted' ] = $ this -> deleted ; } if ( null !== $ this -> properties && ! empty ( $ this -> properties ) ) { $ json [ 'properties' ] = $ this -> properties ; } if ( null !== $ this -> typeId ) { $ json [ 'typeId' ] = $ this -> typeId ; } return $ json ; }
Gets all data that should be available in a json representation.

@return array an associative array of the available variables
Gets all data that should be available in a json representation .