Get the current data json encoded.

@return string
770278
public function getJson()
    {
        $dirty = $this->getDirty();
        if (count($dirty)) {
            $this->internal_original_value = $this->__toString();
        }

        return $this->internal_original_value;
    }
1357669
public function jsonSerialize()
    {
        $json = [];

        foreach (['code', 'message', 'description', 'uri'] as $field) {
            if ($this->$field !== null) {
                $json[$field] = $this->$field;
            }
        }

        return $json;
    }
758616
public function jsonSerialize()
    {
        $serializer = $this->localSerializer ?? static::$serializer;
        if ($serializer) {
            return is_string($serializer)
                ? $this->rawFormat($serializer)
                : call_user_func($serializer, $this);
        }

        return $this->toJSON();
    }
1116093
public function toJSON()
    {
        $mapper = static::getMapper();
        $json = [];

        foreach ($this->toArray() as $key => $value) {
            $attribute = $mapper->getAttribute($key);
            $json[$key] = Type::factory($attribute['type'])->toJSON($value, $attribute);
        }

        return $json;
    }
175384
public function getDecodedJson():array
    {
        if (!($array = json_decode($this->json, true))) {
            throw new \RuntimeException("Unable to decode the response's JSON");
        }
        return json_decode($this->json, true);
    }
884928
public function toJson()
    {
        $contents = array();
        foreach ($this->data as $value) {
            $contents[] = $value->toJson();
        }
        return sprintf("[%s]", implode(",", $contents));
    }
990324
public function jsonSerialize() {
        list($query_data, $meta) = $this->constructQuery($this->source, $this->query, $this->aggs, $this->post_query, $this->settings);

        return $query_data;
    }
1279122
public function json() {
		$array = wp_array_slice_assoc( get_object_vars( $this ),
			[ 'id', 'description', 'priority', 'panel', 'options' ]
		);

		$array['title']    = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
		$array['active']   = $this->active();
		$array['instance'] = $this->instance_number;

		return $array;
	}
597709
public function getData() : ?array
     {
        $rtn = $this->data['data'];

        $rtn = json_decode($rtn, true);

        if ($rtn === false) {
            $rtn = null;
        }

        return $rtn;
     }
1296653
public function asJSON() : string
    {
        $fields = [];

        foreach($this->_data as $key => $value) {
            if(!is_object($value)) {
                $fields[$key] = $value;
            }
        }

        return json_encode($fields);
    }
115841
public function jsonSerialize()
    {
        $data = array_merge(array(), iterator_to_array($this->attributes()));

        foreach ($this as $key => $element) {
            if (isset($data[$key])) {
                if (is_array($data[$key]) === false) {
                    $data[$key] = [$data[$key]];
                }
                $data[$key][] = $element;
            } else {
                $data[$key] = $element;
            }
        }

        $textContent = trim($this);
        if (strlen($textContent) > 0) {
            if (empty($data) === false) {
                $data['#value'] = $textContent;
            } else {
                $data = $textContent;
            }
        }

        if ((is_array($data) && count($data) === 0) || (is_scalar($data) && strlen($data) === 0)) {
            $data = null;
        }

        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);
    }
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;
		}
1185196
public function toJson() {
		$array = array("types"=>array());
		foreach ($this->types as $type) {
			$array["types"][] = $type->toJson();
		}
		if ($this->warningMessage) {
			$array["warning"] = $this->warningMessage;
		}
		return $array;
	}
1285420
public function toJson() : string
    {
        $json = json_encode($this->data);

        if (false === $json) {
            throw JsonException::fromJsonEncodeError(json_last_error_msg());
        }

        return $json;
    }
541480
public function serialize()
    {
        $output = array();
        foreach( $this->data as $key => $value ) {
            if( !array_key_exists( $key, static::$defaults ) or static::$defaults[$key] !== $value ) {
                $output[$key] = $value;
            }
        }
        return json_encode(
            array(
                $this->name,
                $this->entity,
                $this->fullyQualifiedName,
                $output
            )
        );
    }
1297751
public function toJson()
    {
        $packageDetails = new \stdClass;
        $packageDetails->name = $this->getName();
        $packageDetails->description = $this->getDescription();
        $packageDetails->license = $this->getLicense();
        $packageDetails->authors = $this->getAuthors();

        return json_encode($packageDetails, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
    }