Implements JsonSerializable::jsonSerialize().
14144
public function jsonSerialize() {
    $valid =
      (!isset($this->initialAlpha) ||
        $this->validateInitialAlpha($this->initialAlpha)) &&
      (!isset($this->initialScale) ||
        $this->validateInitialScale($this->initialScale));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
733717
public function jsonSerialize()
    {
        return [
            'scenarioName'     => $this->scenarioName,
            'scenarioStateIs'  => $this->scenarioStateIs,
            'newScenarioState' => $this->newScenarioState,
            'request'          => $this->request,
            'response'         => $this->response,
            'proxyTo'          => $this->proxyTo,
            'priority'         => $this->priority,
        ];
    }
434277
public function jsonSerialize()
    {
        $ret = new stdClass();
        $ret->code = $this->errorCode;
        $ret->message = $this->getUserMessage();

        return $ret;
    }
93795
public function jsonSerialize() {
    $valid = !isset($this->initialAlpha) ||
      $this->validateInitialAlpha($this->initialAlpha);
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
49266
public function jsonSerialize() {

    if (isset($this->rangeStart) && !isset($this->rangeLength)) {
      $msg = "If rangeStart is specified, rangeLength is required.";
      $this->triggerError($msg);
      return NULL;
    }

    return parent::jsonSerialize();
  }
453064
public function jsonSerialize()
    {
        $jsonErrors = $this->errors->jsonSerialize();
        $jsonWarnings = $this->warnings->jsonSerialize();

        return [
            'errors' => $jsonErrors && !empty($jsonErrors['errors']) ? $jsonErrors['errors'] : [],
            'warnings' => $jsonWarnings && !empty($jsonWarnings['errors']) ? $jsonWarnings['errors'] : [],
            'warnings' => empty($jsonWarnings['errors']) ? [] : $jsonWarnings['errors'],
            'lastDataRowIndex' => $this->lastDataRowIndex,
            'totalDataRowsProcessed' => $this->totalDataRowsProcessed,
            'importSuccessCount' => $this->importSuccessCount,
        ];
    }
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,
        ];
    }
616971
public function jsonSerialize() { // @codingStandardsIgnoreLine (CONTRIB-6469).
        $data = [
            'label' => $this->label,
            'labels' => $this->labels,
            'type' => $this->type,
            'values' => $this->values,
            'colors' => $this->colors,
            'axes' => [
                'x' => $this->xaxis,
                'y' => $this->yaxis,
            ],
            'smooth' => $this->smooth
        ];
        return $data;
    }
1333511
public function jsonSerialize(){
		$arrData = array();
		$this->updateKeys();

		foreach($this as $strKey => $mixValue){
			if(!is_null($mixValue) || ($this->hasOption('jsonnull') && $this->options()->jsonnull)){
				$arrData[$strKey] = $mixValue;
			}
		}
		return count($arrData) ? $arrData : null;
	}
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);
    }
980813
public function jsonSerialize() {
        $ret = new \stdClass();

        $ret->deleteInsteadOfAppend = $this->deleteInsteadOfAppend;

        if (count($this->subscriberIds) > 0) {
            $ret->subscrberIds = $this->subscriberIds;
        }

        if (count($this->emails) > 0) {
            $ret->emails = $this->emails;
        }

        return $ret;
    }
895704
public function jsonSerialize()
    {
        $jsonArray = [
            "error" => [
                "message" => $this->getMessage(),
                "code" => $this->getCode()
            ]
        ];

        if (isset($this->details)) {
            $jsonArray["error"]["details"] = $this->details;
        }

        if (isset($this->innerError)) {
            $jsonArray["error"]["innererror"] = [
                "code" => $this->innerError
            ];
        }

        return $jsonArray;
    }
368946
public function jsonSerialize() {
    if (isset($this->rangeStart) && !isset($this->rangeLength)) {
      $msg = "If rangeStart is specified, rangeLength is required.";
      $this->triggerError($msg);
      return NULL;
    }
    $valid = (!isset($this->targetAnchorPosition) ||
        $this->validateTargetAnchorPosition($this->targetAnchorPosition));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
359470
public function jsonSerialize()
    {
        $ret = new StdClass;
        foreach ($this->map as $key => $value) {
            $ret->$key = (bool)($this->source & $value);
        }
        return $ret;
    }
615562
public function jsonSerialize()
    {
        $components = [];
        $properties = [];

        foreach ($this->children as $childGroup) {
            foreach ($childGroup as $child) {
                if ($child instanceof self) {
                    $components[] = $child->jsonSerialize();
                } else {
                    $properties[] = $child->jsonSerialize();
                }
            }
        }

        return [
            strtolower($this->name),
            $properties,
            $components,
        ];
    }
1166131
public function jsonSerialize() {
    $valid = (!isset($this->backgroundColor) ||
        $this->validateBackgroundColor($this->backgroundColor)) &&
      (!isset($this->opacity) ||
        $this->validateOpacity($this->opacity));
    if (!$valid) {
      return NULL;
    }
    return parent::jsonSerialize();
  }
846695
public function jsonSerialize()
    {
        $data = new stdClass();
        // Strip undefined values.
        foreach (get_object_vars($this) as $property => $value) {
            if ($value !== UNDEFINED) {
                $data->$property = $value;
            }
        }
        // Strip properties that are for internal (swagger-php) use.
        foreach (static::$_blacklist as $property) {
            unset($data->$property);
        }
        // Correct empty array to empty objects.
        foreach (static::$_types as $property => $type) {
            if ($type === 'object' && is_array($data->$property) && empty($data->$property)) {
                $data->$property = new stdClass;
            }
        }
        // Inject vendor properties.
        unset($data->x);
        if (is_array($this->x)) {
            foreach ($this->x as $property => $value) {
                $prefixed = 'x-' . $property;
                $data->$prefixed = $value;
            }
        }
        // Map nested keys
        foreach (static::$_nested as $nested) {
            if (is_string($nested) || count($nested) === 1) {
                continue;
            }
            $property = $nested[0];
            if ($this->$property === UNDEFINED) {
                continue;
            }
            $keyField = $nested[1];
            $object = new stdClass();
            foreach ($this->$property as $key => $item) {
                if (is_numeric($key) === false && is_array($item)) {
                    $object->$key = $item;
                } else {
                    $key = $item->$keyField;
                    if ($key !== UNDEFINED && empty($object->$key)) {
                        if (method_exists($item, 'jsonSerialize')) {
                            $object->$key = $item->jsonSerialize();
                        } else {
                            $object->$key = $item;
                        }
                        unset($object->$key->$keyField);
                    }
                }
            }
            $data->$property = $object;
        }
        // $ref
        if (isset($data->ref)) {
            $dollarRef = '$ref';
            $data->$dollarRef = $data->ref;
            unset($data->ref);
        }
        return $data;
    }