Crummy\Phlack\Message\Partial::jsonSerialize PHP Method

jsonSerialize() public method

public jsonSerialize ( ) : array
return array
    public function jsonSerialize()
    {
        return array_filter($this->toArray(), function ($value) {
            if ($value instanceof \Countable) {
                return 0 < $value->count();
            }
            return false === $value || !empty($value);
        });
    }