/* (non-PHPdoc)
@see JsonSerializable::jsonSerialize()
350864
public function jsonSerialize()
    {
        return array(
            self::SOURCE_FACTORY => $this->metadataDaoFactory,
            self::FACTORY        => $this->driver,
            self::RESPONSE       => $this->response,
            self::UNIQUE_NAME    => $this->uniqueName,
        );
    }
1302246
public function jsonSerialize()
    {
        $r = [
            'message' => $this->getMessage(),
            'messageContainsHtml' => $this->messageContainsHtml(),
        ];
        if ($this->field) {
            $r['field'] = $this->field;
        }

        return $r;
    }
688064
public function jsonSerialize(): array
    {
        $outObj         = array();
        $outObj['name'] = $this->name;
        if ($this->type !== null) {
            $outObj['type'] = $this->type;
        }
        if ($this->dynamic !== null) {
            $outObj['dynamic'] = $this->dynamic;
        }
        if ($this->docs !== null) {
            $outObj['docs'] = $this->docs;
        }
        return $outObj;
    }
1083692
public function jsonSerialize()
    {
        $result = array();
        foreach (get_class_methods($this) as $method) {
            if (strncmp('get', $method, 3) === 0) {
                if ($method === 'getUnknownProperties') {
                    continue;
                }
                if ($method === 'getIterator') {
                    continue;
                }
                $property = strtolower(preg_replace('/[A-Z]/', '_\0', lcfirst(substr($method, 3))));
                $value = $this->serializeValueToJson($this->{$method} ());
                if ($value !== null) {
                    $result[$property] = $value;
                }
            }
        }
        if (!empty($this->unknownProperties)) {
            foreach ($this->unknownProperties as $property => $value) {
                if (!array_key_exists($property, $result)) {
                    $result[$property] = $this->serializeValueToJson($value);
                }
            }
        }
        return $result;
    }
434277
public function jsonSerialize()
    {
        $ret = new stdClass();
        $ret->code = $this->errorCode;
        $ret->message = $this->getUserMessage();

        return $ret;
    }
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;
    }
1297128
public function serialize()
    {
        $array = $this->jsonSerialize();
        array_walk_recursive($array, function (&$item, $key) {
            if ($item instanceof SimpleXMLElement) {
                $item = json_decode(json_encode((array)$item), true);
            }
        });

        return serialize($array);
    }
1120760
public function jsonSerialize() {
    $valid = (!isset($this->textAlignment) ||
        $this->validateTextAlignment($this->textAlignment));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
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(),
        ]);
    }
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();
    }
232311
public function jsonSerialize()
    {
        $o = [];
        foreach ($this->properties as $prop) {
            $value = $this->$prop;
            if (is_null($value)) {
                $o[$prop] = $value;
            } elseif (is_array($value)) {
                $t = [];
                foreach ($value as $k => $v) {
                    if (is_object($v)) {
                        $t[$k] = $v->jsonSerialize();
                    } else {
                        $t[$k] = (string) $v;
                    }
                }
                $o[$prop] = $t;
            } elseif (is_object($value)) {
                $o[$prop] = $value->jsonSerialize();
            } else {
                $o[$prop] = $value;
            }
        }
        return $o;
    }
674233
public function jsonSerialize()
    {
        return array_map(function ($value) {
            if ($value instanceof JsonSerializable) {
                return $value->jsonSerialize();
            }
            else if ($value instanceof Jsonable) {
                return json_decode($value->toJson(), true);
            }
            else if ($value instanceof Arrayable) {
                return $value->toArray();
            }
            else {
                return $value;
            }
        }, $this->items);
    }
32739
function jsonSerialize()
    {
        return [
            'success' => $this->success,
            'message' => $this->message,
            'error'   => $this->getError(),
            'data'    => SerializerBuilder::create()->build()->serialize(
                $this->data,
                'json',
                SerializationContext::create()->setGroups($this->groups)
            ),
        ];
    }
830982
public function jsonSerialize() { // @codingStandardsIgnoreLine (CONTRIB-6469).
        $data = parent::jsonSerialize();
        $data['horizontal'] = $this->get_horizontal();
        $data['stacked'] = $this->get_stacked();
        return $data;
    }
590876
public function jsonSerialize()
    {
        if (!$this->count()) {
            return [];
        }

        $records = [];

        foreach ($this as $record) {
            if ($record instanceof JsonSerializable) {
                $records[] = $record->jsonSerialize();
            } else {
                $records[] = $record;
            }
        }

        return $records;
    }
1285891
public function jsonSerialize() {
    $valid = !isset($this->preferredStartingPosition) ||
      $this->validatePreferredStartingPosition($this->preferredStartingPosition);
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
757118
public function jsonSerialize() {
        $ret = new \stdClass();

        $ret->name = $this->name;
        $ret->type = $this->type;

        if (is_null($this->subtype) === false) {
            $ret->subtype = $this->subtype;
        }

        $ret->subscriberList = $this->subscriberList;

        return $ret;
    }