Handle json serialize.

@return array
196490
public function jsonSerialize()
    {
        return [
            'count' => $this->count,
            'description' => $this->description,
            'group' => $this->group,
            'id' => $this->id,
            'meta' => $this->rejectHiddenMeta($this->meta),
            'parent_id' => $this->parent_id,
            'slug' => $this->slug,
            'taxonomy_id' => $this->taxonomy_id,
            'taxonomy_slug' => $this->taxonomy_slug,
            'title' => $this->title,
        ];
    }
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);
    }
497780
public function jsonSerialize()
    {
        $arr = parent::jsonSerialize();
        $vars = get_object_vars($this);
        return array_merge($vars, $arr);
    }
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,
        ];
    }
1268021
public function jsonSerialize()
    {
        if ($this->getHasDynamicTemplate() == true) {
            $dynamic_substitutions = $this->getSubstitutions();
            $substitutions = null;
        } else {
            $substitutions = $this->getSubstitutions();
            $dynamic_substitutions = null;
        }

        return array_filter(
            [
                'to' => $this->getTos(),
                'cc' => $this->getCcs(),
                'bcc' => $this->getBccs(),
                'subject' => $this->getSubject(),
                'headers' => $this->getHeaders(),
                'substitutions' => $substitutions,
                'dynamic_template_data' => $dynamic_substitutions,
                'custom_args' => $this->getCustomArgs(),
                'send_at' => $this->getSendAt()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
354445
public function jsonSerialize()
    {
        return array(
            self::METADATA_SOURCE   => $this->metadataSource,
            self::TEMPLATE_VARIABLE => $this->templateVariable,
            self::FILES             => $this->getFiles(),
            self::DIRECTORIES       => $this->directories,
            self::NAME              => $this->name,
            self::ENVIRONNEMENT     => $this->environnement,
            self::DEPENDENCIES      => $this->dependencies,
            self::DTO               => $this->dto,
        );
    }
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);
    }
350864
public function jsonSerialize()
    {
        return array(
            self::SOURCE_FACTORY => $this->metadataDaoFactory,
            self::FACTORY        => $this->driver,
            self::RESPONSE       => $this->response,
            self::UNIQUE_NAME    => $this->uniqueName,
        );
    }
478120
public function jsonSerialize(): array
    {
        $returnArray = [];
        foreach ($this->getArrayCopy() as $value) {
            $returnArray[] = $value->JsonSerialize();
        }
        return $returnArray;
    }
592703
public function jsonSerialize()
    {
        return [
            'active' => $this->active,
            'attr' => $this->attr,
            'classes' => $this->classes,
            'description' => $this->description,
            'id' => $this->id,
            'item_id' => $this->item_id,
            'item_type' => $this->item_type,
            'link' => $this->link,
            'modified_at' => $this->modified_at,
            'order' => $this->order,
            'parent_id' => $this->parent_id,
            'target' => $this->target,
            'title' => $this->title,
        ];
    }
1224189
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'utm_source' => $this->getCampaignSource(),
                'utm_medium' => $this->getCampaignMedium(),
                'utm_term' => $this->getCampaignTerm(),
                'utm_content' => $this->getCampaignContent(),
                'utm_campaign' => $this->getCampaignName()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
237775
public function jsonSerialize()
    {
        $properties = [
            '_templatePath', '_template', '_plugin', '_theme', '_layout', '_autoLayout',
            '_layoutPath', '_name', '_className', '_options', '_helpers'
        ];

        $array = [];

        foreach ($properties as $property) {
            $array[$property] = $this->{$property};
        }

        return array_filter($array, function ($i) {
            return !is_array($i) && strlen($i) || !empty($i);
        });
    }
838515
public function jsonSerialize()
    {
        return [
            'activation_key' => $this->activation_key,
            'capabilities' => $this->capabilities,
            'capability_key' => $this->capability_key,
            'created_at' => $this->created_at,
            'email' => $this->email,
            'id' => $this->id,
            'login' => $this->login,
            'meta' => $this->rejectHiddenMeta($this->meta),
            'name' => $this->name,
            'password' => $this->password,
            'premissions' => $this->premissions,
            'roles' => $this->roles,
            'status' => $this->status,
            'username' => $this->username,
            'website' => $this->website,
        ];
    }
703104
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'text' => $this->getText(),
                'html' => $this->getHtml()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
149002
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'email' => $this->getEmail()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
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'),
    );
  }
330709
public function jsonSerialize(): array
    {

        $returnArray = parent::jsonSerialize();
        $returnArray['Email'] = $this->email;
        $returnArray['Numbers'] = $this->numbers;
        if (count($this->contacts) > 0) {
            $returnArray['Contacts'] = [];
            foreach ($this->contacts as $contact) {
                $returnArray['Contacts'][] = $contact->getID();
            }
        }
        if (count($this->groups) > 0) {
            $returnArray['Groups'] = [];
            foreach ($this->groups as $group) {
                $returnArray['Groups'][] = $group->getID();
            }
        }
        return $returnArray;
    }