@Test
public void testReadNumberAsString() throws IOException, B2JsonException {

    // Start with bogus.
    checkNumber("xxx", null);
    // Something after the number
    checkNumber("5 a", "5");
    // Negative and not
    checkNumber("999 5", "999");
    checkNumber("-0 5", "-0");
    // Nothing following a leading 0
    checkNumber("05", null);
    // Decimal point
    checkNumber(".45", null);
    checkNumber("0.45", "0.45");
    checkNumber("123.", "123.");
    checkNumber("3.14", "3.14");
    // Exponents
    checkNumber("5e10", "5e10");
    checkNumber("5e+10", "5e+10");
    checkNumber("5e-10", "5e-10");
    checkNumber("5ex10", null);
    // Comments
    checkNumber("// comment \n 8", "8");
}