(self)
| 349 | "Bad data encounted in numeric data") |
| 350 | |
| 351 | def readJSONDouble(self): |
| 352 | self.context.read() |
| 353 | if self.reader.peek() == QUOTE: |
| 354 | string = self.readJSONString(True) |
| 355 | try: |
| 356 | double = float(string) |
| 357 | if (self.context.escapeNum is False and |
| 358 | not math.isinf(double) and |
| 359 | not math.isnan(double)): |
| 360 | raise TProtocolException( |
| 361 | TProtocolException.INVALID_DATA, |
| 362 | "Numeric data unexpectedly quoted") |
| 363 | return double |
| 364 | except ValueError: |
| 365 | raise TProtocolException(TProtocolException.INVALID_DATA, |
| 366 | "Bad data encounted in numeric data") |
| 367 | else: |
| 368 | if self.context.escapeNum() is True: |
| 369 | self.readJSONSyntaxChar(QUOTE) |
| 370 | try: |
| 371 | return float(self.readJSONNumericChars()) |
| 372 | except ValueError: |
| 373 | raise TProtocolException(TProtocolException.INVALID_DATA, |
| 374 | "Bad data encounted in numeric data") |
| 375 | |
| 376 | def readJSONBase64(self): |
| 377 | string = self.readJSONString(False) |
nothing calls this directly
no test coverage detected