function jsonSerialize()
    {
        $array = [
            'arguments' => $this->arguments,
            'children' => array()
        ];

        foreach ($this->children as $child) {
            if (!$child instanceof WhiteLine & !$child instanceof Comment) {
                $array['children'][$child->getName()] = $child->jsonSerialize();
            }
        }

        return $array;
    }