Class JsonDoubleParser

java.lang.Object
ch.randelshofer.fastdoubleparser.JsonDoubleParser

public class JsonDoubleParser extends Object
Parses a double value; the supported syntax is compatible with number in the JSON format specification.

Syntax

Numeric values that cannot be represented in the grammar below (such as Infinity and NaN) are not permitted.

 number = [ minus ] int [ frac ] [ exp ]

 minus  = %x2D                        ; -
 int    = zero / ( digit1-9 *DIGIT )
 frac   = decimal-point 1*DIGIT
 exp    = e [ minus / plus ] 1*DIGIT

 decimal-point = %x2E                 ; .
 digit1-9      = %x31-39              ; 1-9
 e             = %x65 / %x45          ; e E
 plus          = %x2B                 ; +
 zero          = %x30                 ; 0
 

Supported maximal input length:

  • number without white space around it: Integer.MAX_VALUE - 4 = 2,147,483,643 characters.
References:
IETF RFC 8259. The JavaScript Object Notation (JSON) Data Interchange Format, Chapter 6. Numbers
www.ietf.org