private function endNull() { $null = $this->buffer; if ($null === 'null') { $this->listener->value(null); } else { throw new ParsingError($this->lineNumber, $this->charNumber, "Expected 'null'. Got: " . $null); } $this->buffer = ''; $this->state = self::STATE_AFTER_VALUE; }