()
| 390 | } |
| 391 | |
| 392 | private function readJSONDouble() |
| 393 | { |
| 394 | $this->context_->read(); |
| 395 | |
| 396 | if (substr($this->reader_->peek(), 0, 1) == self::QUOTE) { |
| 397 | $arr = $this->readJSONString(true); |
| 398 | |
| 399 | if ($arr == "NaN") { |
| 400 | return NAN; |
| 401 | } elseif ($arr == "Infinity") { |
| 402 | return INF; |
| 403 | } elseif (!$this->context_->escapeNum()) { |
| 404 | throw new TProtocolException( |
| 405 | "Numeric data unexpectedly quoted " . $arr, |
| 406 | TProtocolException::INVALID_DATA |
| 407 | ); |
| 408 | } |
| 409 | |
| 410 | return floatval($arr); |
| 411 | } else { |
| 412 | if ($this->context_->escapeNum()) { |
| 413 | $this->readJSONSyntaxChar(self::QUOTE); |
| 414 | } |
| 415 | |
| 416 | return floatval($this->readJSONNumericChars()); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | private function readJSONObjectStart() |
| 421 | { |
no test coverage detected