private function transferObjectTo(\DOMNode $target, $value, $recursions)
{
$properties = is_array($value) ? $value : get_object_vars($value);
if ($this->_verbose || empty($properties)) {
$target->setAttributeNS(self::XMLNS, 'json:type', 'object');
}
foreach ($properties as $property => $item) {
$qname = $this->getQualifiedName($property, self::DEFAULT_QNAME);
$target->appendChild($child = $target->ownerDocument->createElement($qname));
if ($this->_verbose || $qname != $property) {
$child->setAttributeNS(self::XMLNS, 'json:name', $property);
}
$this->transferTo($child, $item, $recursions);
}
}