public function toJson(Mapper_Mapable $subject)
    {
        $jsonArrayValue = array();
        if ($subject instanceof DeleteBySaving && $subject->isDeleted()) {
//			$jsonArrayValue->addChild('_destroy', '1');
        }

        foreach ($subject->toArray() as $property => $value) {
            $key = $this->propertyToXmlkey($property);
            if (is_null($value)) {
                $jsonArrayValue[$key] = null;
            } elseif (is_bool($value)) {
                $jsonArrayValue[$key] = $value === true ? 'true' : 'false';
            } elseif (is_array($value)) {
                $jsonArrayValue[$key] = $value;
            } elseif (!is_object($value) && !is_array($value)) {
                $jsonArrayValue[$key] = $value;
            } elseif (is_object($value) && $value instanceof Mapper_Mapable) {
                $jsonArrayValue[$key] = $this->toXml($value);
            } elseif (is_object($value) && $value instanceof \DateTime) {
                $jsonArrayValue[$key] = $value->format('c');
            } else {
                throw new Mapper_Exception('Invalid value for key ' . $key);
            }
        }

        $key = $this->mapObjectToElementName($subject);
        return array($key => $jsonArrayValue);
    }