public function jsonSerialize()
    {
        // A vcard does not have sub-components, so we're overriding this
        // method to remove that array element.
        $properties = [];

        foreach ($this->children() as $child) {
            $properties[] = $child->jsonSerialize();
        }

        return [
            strtolower($this->name),
            $properties,
        ];
    }
public function jsonSerialize()
    {
        // A vcard does not have sub-components, so we're overriding this
        // method to remove that array element.
        $properties = [];

        foreach ($this->children() as $child) {
            $properties[] = $child->jsonSerialize();
        }

        return [
            strtolower($this->name),
            $properties,
        ];
    }
public function jsonSerialize ( ) { // A vcard does not have sub-components, so we're overriding this // method to remove that array element. $ properties = [ ] ; foreach ( $ this -> children ( ) as $ child ) { $ properties [ ] = $ child -> jsonSerialize ( ) ; } return [ strtolower ( $ this -> name ) , $ properties , ] ; }
This method returns an array, with the representation as it should be
encoded in json. This is used to create jCard or jCal documents.

@return array
This method returns an array with the representation as it should be encoded in json . This is used to create jCard or jCal documents .