*/
private void doJsonNumber(String key, int start) throws JsonReaderException, JsonTextOutlineParserException, BadLocationException, BadPositionCategoryException {
boolean decimalPointSet = false;
JsonNumber jsonNumber = new JsonNumber(parent, key);
parent.addChild(jsonNumber);
jsonNumber.setStart(start, doc);
StringBuilder numberBuilder = new StringBuilder();
numberBuilder.append(parser.getCurrent());
char ch;
do {
ch = parser.getNextChar();
if (Character.isDigit(ch)) {
numberBuilder.append(ch);
continue;
}
if (!decimalPointSet && ch == point) {
decimalPointSet = true;
numberBuilder.append(ch);
continue;
}
jsonNumber.setLength(parser.getPosition() - start);
if (isClosed(ch)) {
break;
}
if (isNotWhiteSpace(ch)) {
JsonError jsonError = new JsonError(parent, "Value " + ch + " not expected here");
parent.addChild(jsonError);
throw new JsonTextOutlineParserException();
}
ch = parser.getNextClean();
if (isNotClosed(ch)) {
JsonError jsonError = new JsonError(parent, "Expected end value");
parent.addChild(jsonError);
throw new JsonTextOutlineParserException();
}
break;
} while (ch != eof);
jsonNumber.setValue(numberBuilder.toString());
}