private long readJsonInteger ( ) throws IOException { context . read ( ) ; if ( context . escapeNum ( ) ) { readJsonSyntaxChar ( QUOTE ) ; } String str = readJsonNumericChars ( ) ; if ( context . escapeNum ( ) ) { readJsonSyntaxChar ( QUOTE ) ; } try { return Long . valueOf ( str ) ; } catch ( NumberFormatException ex ) { throw new ProtocolException ( "Bad data encountered in numeric data" ) ; } }
Read in a Json number . If the context dictates read in enclosing quotes .