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

        if (null !== $this->mediaId) {
            $json['mediaId'] = $this->mediaId;
        }
        if (null !== $this->mediaUrl) {
            $json['mediaUrl'] = $this->mediaUrl;
        }
        if (null !== $this->pageUrl) {
            $json['pageUrl'] = $this->pageUrl;
        }
        if (null !== $this->context && !empty($this->context)) {
            $json['context'] = $this->context;
        }
        if (null !== $this->language) {
            $json['language'] = $this->language;
        }

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

        if (null !== $this->mediaId) {
            $json['mediaId'] = $this->mediaId;
        }
        if (null !== $this->mediaUrl) {
            $json['mediaUrl'] = $this->mediaUrl;
        }
        if (null !== $this->pageUrl) {
            $json['pageUrl'] = $this->pageUrl;
        }
        if (null !== $this->context && !empty($this->context)) {
            $json['context'] = $this->context;
        }
        if (null !== $this->language) {
            $json['language'] = $this->language;
        }

        return $json;
    }
Gets all data that should be available in a json representation.

@return array an associative array of the available variables