* Identical to readJSONInteger but without the final cast. * Needed for proper handling of i64 on 32 bit machines. Why a * separate function? So we don't have to force the rest of the * use cases through the extra conditional. */
()
| 369 | * use cases through the extra conditional. |
| 370 | */ |
| 371 | private function readJSONIntegerAsString() |
| 372 | { |
| 373 | $this->context_->read(); |
| 374 | |
| 375 | if ($this->context_->escapeNum()) { |
| 376 | $this->readJSONSyntaxChar(self::QUOTE); |
| 377 | } |
| 378 | |
| 379 | $str = $this->readJSONNumericChars(); |
| 380 | |
| 381 | if ($this->context_->escapeNum()) { |
| 382 | $this->readJSONSyntaxChar(self::QUOTE); |
| 383 | } |
| 384 | |
| 385 | if (!is_numeric($str)) { |
| 386 | throw new TProtocolException("Invalid data in numeric: " . $str, TProtocolException::INVALID_DATA); |
| 387 | } |
| 388 | |
| 389 | return $str; |
| 390 | } |
| 391 | |
| 392 | private function readJSONDouble() |
| 393 | { |
no test coverage detected