WP_HTTP_Response::jsonSerialize

Advertisement

Summery Summery

Retrieves the response data for JSON serialization.

Syntax Syntax

WP_HTTP_Response::jsonSerialize()

Description 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.

Return Return

(mixed) Any JSON-serializable value.

Source Source

File: wp-includes/class-wp-http-response.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

What are you looking for?