Returns an array of parameters to serialize when this is serialized with
json_encode().

@return array
164177
public function jsonSerialize()
    {
        $parameters = [];

        if ($this->accessToken) {
            $parameters['access_token'] = $this->accessToken;
        }

        if ($this->userId) {
            $parameters['user_id'] = $this->userId;
        }

        if ($this->entityId) {
            $parameters['entity_id'] = $this->entityId;
        }

        if ($this->expires) {
            $parameters['expires'] = $this->expires;
        }

        return $parameters;
    }
1135865
public function serialize(): array {
        // base 64 encode
        $details = array_map(function($value) {
            return base64_encode($value);
        }, $this->details);

        // enrich with encryption type
        return $details + ['encryption' => $this->encryption];
    }
348866
public function jsonSerialize(): array
    {
        return [
            'number' => $this->yearNumber,
            'weeks' => array_map(function(Week $week) {
                return $week->jsonSerialize();
            }, $this->weeks)
        ];
    }
818982
public function jsonSerialize(): array
    {
        return [
            '__rialto_function__' => true,
            'parameters' => (object) $this->parameters,
            'body' => $this->body,
            'scope' => (object) $this->scope,
            'async' => $this->async,
        ];
    }
829360
public function jsonSerialize()
    {
        return array(
            'type' => $this->getType(),
            'bodyText' => $this->getBodyText(),
            'bodyHtml' => $this->getBodyHtml(),
            'recipients' => $this->getRecipients(),
            'from'    => $this->getFrom(),
            'subject' => $this->getSubject(),
            'text'    => quoted_printable_decode($this->getBodyText(true)),
            'html'    => quoted_printable_decode($this->getBodyHtml(true))
        );
    }
553280
public function jsonSerialize() {
    return array(
      'iso'  =>       $this->format(DATE_RFC2822),
      'sql'  =>       $this->format('Y-m-d H:i:s.u'),
      'tz'   =>       $this->format('T'),
      'unix' => (int) $this->format('U'),
    );
  }
1200668
public function jsonSerialize()
    {
        $data = [
            'url' => $this->url
        ];

        $data = array_merge($data, $this->buildJsonAttributes([
            'certificate' => $this->certificate,
            'max_connections' => $this->maxConnections,
            'allowed_updates' => $this->allowedUpdates
        ]));

        return $data;
    }
1267346
public function jsonSerialize()
    {
        return [
            'id' => $this->id,
            'size' => $this->size,
            'link' => $this->link,
            'title' => $this->title,
            'caption' => $this->caption,
            'description' => $this->description,
            'type' => $this->type,
            'mimeType' => $this->mime_type,
            'meta' => $this->meta,
            'width' => $this->width,
            'height' => $this->height,
        ];
    }
1207966
public function jsonSerialize()
    {
        return [
            'class' => get_class($this->getMessage()),
            'data' => $this->getMessage()->jsonSerialize(),
            'signature' => $this->getSignature(),
            'certificate' => $this->getCertificate()
        ];
    }
850692
public function jsonSerialize(): array
    {
        $data = ['required' => $this->requiresAuth()];
        if ($this->requiresAuth()) {
            $data['requiresLogin'] = $this->requiresLogin();
        }

        if ($this->requiresRoles()) {
            $data['requiresRoles'] = true;
            $data['requiredRole']  = $this->requiredRole();
        }

        return $data;
    }
337449
public function jsonSerialize(){
		$arrData = array();

		foreach($this as $strKey => $objValue){
			if($this->options($strKey)->json){
				$mixValue = $objValue->jsonSerialize();
				$mixJSON = json_encode($mixValue);
				if((!is_null($mixValue) && $mixJSON!='[]') || $this->options($strKey)->jsonnull){
					$arrData[$strKey] = $mixValue;
				}
			}
		}
		return $arrData;
	}
884772
public function jsonSerialize(): array
    {
        $result = [];
        foreach ($this->errors as $paramName => $errors) {
            $result[$paramName] = [
                    'field'  => $paramName,
                    'errors' => array_values($errors)
            ];
        }

        return ['errors' => $result];
    }
970022
public function jsonSerialize() {
		return [
			self::JSON_KEY_GET          => $this->get,
			self::JSON_KEY_POST         => $this->post,
			self::JSON_KEY_FILES        => $this->files,
			self::JSON_KEY_COOKIE       => $this->cookie,
			self::JSON_KEY_HEADERS      => $this->HEADERS,
			self::JSON_KEY_METHOD       => $this->getRequestMethod(),
			self::JSON_KEY_INPUT        => $this->INPUT,
			self::JSON_KEY_PARSED_INPUT => $this->PARSED_INPUT,
			self::JSON_KEY_REQUEST_URI  => $this->getRequestUri(),

			self::JSON_KEY_PARSED_REQUEST_URI => $this->parsedUri,
		];
	}
1012126
public function jsonSerialize(): array
    {
        $contactArray = parent::jsonSerialize();
        $contactArray['ID'] = $this->contactID;
        $contactArray['OwnerID'] = $this->ownerID;
        $contactArray['Modified'] = isset($this->created) ? $this->updated->format("Y-m-d\TH:i:s.").
            substr($this->updated->format('u'), 0, 3) : null;
        $contactArray['Created'] = isset($this->created) ? $this->created->format("Y-m-d\TH:i:s.").
            substr($this->updated->format('u'), 0, 3) : null;

        return array_filter($contactArray);
    }
956900
public function jsonSerialize() {
        $ret = new \stdClass();
        $ret->name = $this->name;

        if(count($this->values) > 0) {
            $values = array();
            $values['values'] = $this->values;
            $ret->values = $values;
        }

        $ret->nullable = $this->nullable;

        return $ret;
    }
173538
public function jsonSerialize()
    {
        return array_merge($this->toJsonSerialize(), [
            'inheritance' => $this->inheritance,
            'abstract' => $this->isAbstract,
            'meta' => $this->meta,
            'name' => $this->name,
            '__CLASS__' => get_called_class(),
        ]);
    }
1260050
public function jsonSerialize()
    {
        // @codeCoverageIgnoreStart
        if ( ! $this->originalFilename()) {
            return [];
        }
        // @codeCoverageIgnoreEnd

        $data = [];

        foreach ($this->variants(true) as $variant) {
            $data[ $variant ] = [
                'path' => $this->variantPath($variant),
                'url'  => $this->url($variant)
            ];
        }

        return $data;
    }