Automattic\WooCommerce\Vendor\GraphQL\Language\AST

Node::jsonSerializepublicWC 1.0

Improves upon the default serialization by:

  • excluding null values
  • excluding large reference values such as @see Location::$source.

Method of the class: Node{}

No Hooks.

Returns

Array. mixed>

Usage

$Node = new Node();
$Node->jsonSerialize(): array;

Node::jsonSerialize() code WC 10.9.4

public function jsonSerialize(): array
{
    return $this->toArray();
}