jsonSerialize()
Part of the JsonSerializable interface.
Changes the representation of this object when using json.

@return string The data to be returned to json_encode().
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'),
    );
  }
815719
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'threshold' => $this->getThreshold(),
                'post_to_url' => $this->getPostToUrl()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
1222684
public function jsonSerialize()
    {
        $jsonData = $this->getData();
        if (isset($jsonData["_id"])) {
            $jsonData["id"] = (string)$jsonData["_id"];
            // @codeCoverageIgnoreStart
            unset($jsonData["_id"]);
            // @codeCoverageIgnoreEnd
        }
        foreach ($this->_schema as $name => $dsc) {
            if (@$dsc['hidden']) {
                // @codeCoverageIgnoreStart
                unset($jsonData[$name]);
                // @codeCoverageIgnoreEnd
            }
        }
        return $jsonData;
    }
822466
public function jsonSerialize()
    {
        // if formatting is requested, well then format baby!
        $config = $this->di->get('config');
        if ($config['application']['propertyFormatTo'] == 'none') {
            $attributes = $this->attributes;
        } else {
            $inflector = $this->di->get('inflector');
            $attributes = [];
            foreach ($this->attributes as $key => $value) {
                $attributes[$inflector->normalize($key,
                    $config['application']['propertyFormatTo'])] = $value;
            }
        }

        $result = [
            'id' => $this->id,
            'type' => $this->type,
            'attributes' => $attributes
        ];

        if ($this->relationships) {
            $result['relationships'] = $this->relationships;
        }

        return $result;
    }
790357
public function jsonSerialize()
    {
        $alert = [];

        if (is_string($this->title)) {
            $alert[self::ALERT_TITLE_KEY] = $this->title;
        }

        if (is_string($this->subtitle)) {
            $alert[self::ALERT_SUBTITLE] = $this->subtitle;
        }

        if (is_string($this->body)) {
            $alert[self::ALERT_BODY_KEY] = $this->body;
        }

        if (is_string($this->titleLocKey)) {
            $alert[self::ALERT_TITLE_LOC_KEY] = $this->titleLocKey;
        }

        if (is_array($this->titleLocArgs)) {
            $alert[self::ALERT_TITLE_LOC_ARGS_KEY] = $this->titleLocArgs;
        }

        if (is_string($this->actionLocKey)) {
            $alert[self::ALERT_ACTION_LOC_KEY] = $this->actionLocKey;
        }

        if (is_string($this->locKey)) {
            $alert[self::ALERT_LOC_KEY] = $this->locKey;
        }

        if (is_array($this->locArgs)) {
            $alert[self::ALERT_LOC_ARGS_KEY] = $this->locArgs;
        }

        if (is_string($this->launchImage)) {
            $alert[self::ALERT_LAUNCH_IMAGE_KEY] = $this->launchImage;
        }

        return $alert;
    }
344137
public function jsonSerialize()
    {
        $jsonArray = $this->getArrayCopy();
        unset($jsonArray['inputFilter']);
        unset($jsonArray['__initializer__']);
        unset($jsonArray['__cloner__']);
        unset($jsonArray['__isInitialized__']);
        unset($jsonArray['game']);
        unset($jsonArray['cards']);
        unset($jsonArray['distribution']);
        unset($jsonArray['createdAt']);
        unset($jsonArray['updatedAt']);

        return $jsonArray;
    }
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,
		];
	}
602510
public function jsonSerialize()
    {
        return Collection::make([
            'url' => $this->url,
            'callback_data' => $this->callbackData,
            'request_contact' => $this->requestContact,
            'request_location' => $this->requestLocation,
            'text' => $this->text,
        ])->filter()->toArray();
    }
512668
public function jsonSerialize()
		{
			$data               = (object) [];
			$data->type         = 'folder';
			$data->name         = $this->name;
			$data->route        = $this->route;
			$data->parents      = $this->parents;
			$data->folders      = $this->folders;
			$data->controllers  = $this->controllers;
			return $data;
		}
1257572
public function jsonSerialize(): string
    {
        $output = array($this->getLocale() => $this->data);
        return json_encode($output, JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_TAG);
    }
840621
public function jsonSerialize()
    {
        return array_map(function($value)
        {
            if($value instanceof JsonSerialize)
                return $value->jsonSerialize();
            elseif($value instanceof  JsonInterface)
                return json_decode($value->toJson(), true);
            elseif($value instanceof ArrayInterface)
                return $value->toArray();
            else
                return $value;

        }, $this->attributes);
    }
80775
public function jsonSerialize()
    {
        $data = $this->getData();
        if (empty($data)) {
            return null;
        }
        foreach (array_keys(static::FOREIGN_KEYS) as $column) {
            $data[$column] = $this->__get($column);
        }
        return $data;
    }
1342388
protected function toJsonSerialize()
    {
        return [
            'attributes' => $this->attributes,
            'restriction' => $this->isRestriction,
            'struct' => $this->isStruct,
            'types' => $this->types,
            'values' => $this->values,
            'list' => $this->list,
        ];
    }
1102704
public function jsonSerialize() {
		$vars = get_object_vars($this);
		unset($vars['keyProperties']);
		unset($vars['db']);
		unset($vars['loadedFromDb']);
		unset($vars['typeList']);
		unset($vars['cache']);
		unset($vars['errors']);

		return $vars;
	}
614298
public function jsonSerialize()
    {
        return [
            'name' => $this->name(),
            'path' => $this->path(),
            'directory' => $this->directory(),
            'container' => $this->container(),
            'size' => $this->size(),
            'content_type' => $this->contentType(),
            'last_modified' => $this->lastModifiedAt(),
            'etag' => $this->etag(),
        ];
    }
1147553
function jsonSerialize()
    {
        $data = [
            'text' => $this->text
        ];

        if ($this->replyMarkup) {
            $data['reply_markup'] = $this->replyMarkup;
        }

        return $data;
    }
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;
    }