public function startValueElement($name, $value, $attributes = array())
{
$this->checkStartValueElement($name);
$jsonValue = null;
if (empty($attributes)) {
$jsonValue = $value;
} else {
$jsonValue = new Json\Object($this->json);
foreach ($attributes as $attributeName => $attributeValue) {
$jsonValue->{'_' . $attributeName} = $attributeValue;
}
$jsonValue->{'#text'} = $value;
}
if ($this->json instanceof Json\ArrayObject) {
$this->json[] = $jsonValue;
} else {
$this->json->{$name} = $jsonValue;
}
}