Get the value.

@return array
$json array.
320858
public function getValue() {
    $value = [];
    $definitions = $this->entityTypeManager->getDefinitions();

    foreach ($definitions as $definition) {
      $entity_type_id = $definition->id();
      // We don't need to add config entities.
      if ($definition instanceof ConfigEntityType) {
        continue;
      }

      $entity_bundle_info = \Drupal::service('entity_type.bundle.info');
      $bundle_info = $entity_bundle_info->getBundleInfo($entity_type_id);
      $bundles = [];

      if (count($bundle_info) > 1) {
        foreach ($bundle_info as $bundle_id => $bundle_data) {
          // Suppress warning about unused variable.
          unset($bundle_data);
          $keys = $definition->getKeys();
          $bundle_key = $keys['bundle'] === NULL ? 'bundle' : $keys['bundle'];

          $query = \Drupal::entityQuery($entity_type_id);
          $query->condition($bundle_key, $bundle_id);
          $query->count();
          $count = $query->execute();

          $row = [
            'bundle' => $bundle_id,
            'count' => $count,
          ];

          $bundles[] = $row;
        }
      }

      $storage = $this->entityTypeManager->getStorage($entity_type_id);
      $query = $storage->getAggregateQuery();
      $query->count();
      $count = $query->execute();

      $entity = [
        'entity_type' => $entity_type_id,
        'count' => $count,
        'bundles' => $bundles,
      ];

      $value[$entity_type_id] = $entity;
    }

    return $value;
  }
659710
public function get()
    {
        $url = $this->getUrl('get');
        $json = $this->curl->get($url);

        return $json;
    }
1160410
protected function _getJson()
    {
        if ($this->_json) {
            return $this->_json;
        }

        return $this->_json = json_decode($this->_getBody(), true);
    }
56615
public function getJson()
    {
        if (empty($this->json_loaded)) {
            if ($this->getBody() && $this->isJson()) {
                $this->json = json_decode($this->getBody(), true);

                if (json_last_error()) {
                    throw new RuntimeException('Failed to parse JSON. Reason: ' . json_last_error_msg());
                }
            }

            $this->json_loaded = true;
        }

        return $this->json;
    }
1267619
public function jsonVal()
    {
        $json = $this->propertyVal();
        if (!is_string($json)) {
            $json = json_encode($json);
        }
        if (!$json || $json == 'null') {
            $json = '';
        }
        return $json;
    }
149002
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'email' => $this->getEmail()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
868037
public function toJson()
    {
        $data = [];

        foreach ($this->attributes as $key => $value) {
            if (!in_array($key, $this->hidden)) {
                $data[$key] = $value;
            }
        }

        return json_encode($data);
    }
642698
public function getValues(): array
    {
        $result = array();

        foreach ($this->_definition as $key => $value) {
            $result[$key] = $this->$key;
        }

        return $result;
    }
28449
public function jsonSerialize(){
		if(is_object($this->mixValue)){
			$mixJSON = json_encode($this->mixValue);
			if((!is_null($this->mixValue) && $mixJSON!='[]') || ($this->hasOption('jsonnull') && $this->options()->jsonnull)){
				return $this->mixValue;
			}
		}

		return null;
	}
319013
public function getValues()
    {
        if (!$this->storeSerialized) {
            return $this->values;
        }

        $values = $this->values;
        foreach ($values as $k => $v) {
            if (null === $v || 'N;' === $v) {
                continue;
            }
            if (!\is_string($v) || !isset($v[2]) || ':' !== $v[1]) {
                $values[$k] = serialize($v);
            }
        }

        return $values;
    }
889134
public function jsonSerialize() {
        $data = new stdClass();
        $vars = get_object_vars($this);

        foreach ($vars as $property => $value) {
            if ($value === null) {
                continue;
            }

            $data->{$property} = $value;
        }

        return $data;
    }
725104
public function getValue()
    {
        $value = json_decode($this->value, true);
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new InvalidJsonException("Invalid JSON config value for id: " . $this->getId());
        }

        return $value;
    }
136344
public function getValue() {
        if (!is_null($this->value))
            return $this->value;
        $value = $this->getArrayValue($this->form->method == 'POST' ? $_POST : $_GET, $this->getName());
        if ($value) {
            return $value;
        }
        $key = null;
        if (false !== strpos($this->name, '[')){
            $name = explode('[', $this->name, 2);
            $key = substr($name[1], 0, strlen($name[1]) - 1);
            $name = $name[0];
        } else {
            $name = $this->name;
        }
        if ($this->form->model && is_object($this->form->model) && (!$this->form->model->isNewRecord() || $this->form->model->$name)) {
            $val = $this->form->model->$name;
            if (!is_null($key)){
                return isset($val[$key])?$val[$key]:null;
            } else {
                return $val;
            }
        }
        return $this->defaultValue;
    }
469057
public function getJsonValue()
    {
        $parts = DateTimeParser::parseVCardDateTime($this->getValue());

        $dateStr =
            $parts['year'].'-'.
            $parts['month'].'-'.
            $parts['date'].'T'.
            $parts['hour'].':'.
            $parts['minute'].':'.
            $parts['second'];

        // Timezone
        if (!is_null($parts['timezone'])) {
            $dateStr .= $parts['timezone'];
        }

        return [$dateStr];
    }
1273105
public function getValue()
    {
        try {
            return JsonValidator::validate($this->value) ? $this->value : '';
        } catch (InvalidArgumentException $e) {
            return $e->getMessage();
        }
    }
470158
public function toArrayAll()
    {
        $data = $this->toArray();

        foreach(self::$jsonable as $key){

            if(isset($data[$key]) && Utils::isJson($data[$key])){
                $data[$key] = json_decode($this->{$key});
            }
        }

        return $data;
    }
108155
public function json() {
			$json = parent::json();

			$is_contact_visible = $this->fs->is_page_visible( 'contact' );
			$is_support_visible = $this->fs->is_page_visible( 'support' );

			$json['theme_title'] = $this->fs->get_plugin_name();

			if ( $is_contact_visible && $is_support_visible ) {
				$json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
			}

			if ( $is_contact_visible ) {
				$json['contact'] = array(
					'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
					'url'   => $this->fs->contact_url(),
				);
			}

			if ( $is_support_visible ) {
				$json['support'] = array(
					'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
					'url'   => $this->fs->get_support_forum_url()
				);
			}

			return $json;
		}