WP_HTTP_Response::jsonSerialize(): mixed

Retrieves the response data for JSON serialization.


Description

It is expected that in most implementations, this will return the same as get_data(), however this may be different if you want to do custom JSON data handling.


Top ↑

Return

mixed Any JSON-serializable value.


Top ↑

Source

File: wp-includes/class-wp-http-response.php. View all references

public function jsonSerialize() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
	return $this->get_data();
}


Top ↑

Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.