public function load($source, $contentType, $options = [])
{
if (FALSE !== ($json = $this->getJson($source, $contentType))) {
$dom = new Document('1.0', 'UTF-8');
$dom->appendChild($root = $dom->createElementNS(self::XMLNS, 'json:json'));
$onMapKey = $this->_onMapKey;
if (isset($options[self::ON_MAP_KEY]) && is_callable($options[self::ON_MAP_KEY])) {
$this->onMapKey($options[self::ON_MAP_KEY]);
}
$this->transferTo($root, $json, $this->_recursions);
$this->_onMapKey = $onMapKey;
return $dom;
}
return NULL;
}