private function _end_object()
 {
     $popped = array_pop($this->_stack);
     if ($popped !== self::STACK_OBJECT) {
         throw new ParsingError($this->_line_number, $this->_char_number, "Unexpected end of object encountered.");
     }
     $this->_listener->end_object();
     $this->_state = self::STATE_AFTER_VALUE;
     if (empty($this->_stack)) {
         $this->_end_document();
     }
 }