public function fromJson(Array $jsonArray)
    {
        $classname = $this->jsonKeyToClassname(key($jsonArray));
        $jsonArray = current($jsonArray);
        if (!is_null($classname)) {
            $return = new $classname();
            if ($return instanceof ArrayObject) {
                foreach ($jsonArray as $child) {
                    $return->append($this->fromJson($child));
                }
            } else {
                $objectData = array();
                foreach ($jsonArray as $key => $child) {
                    $key = $this->keyToProperty($key);
                    if (isset($objectData[$key])) {
                        if (!is_array($objectData[$key])) {
                            $objectData[$key] = array($objectData[$key]);
                        }
                        $objectData[$key][] = $this->fromJson(array($key => $child));
                    } else {
                        $objectData[$key] = $this->fromJson(array($key => $child));
                    }
                }
                $return = new $classname($objectData);
            }
        } else {
            $return = $jsonArray;
        }

        return $return;
    }