Package uk.blankaspect.common.json
Class JsonParser.Builder
java.lang.Object
uk.blankaspect.common.json.JsonParser.Builder
- Enclosing class:
JsonParser
This class implements a builder for a JSON parser.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates and returns a new instance of a JSON parser that is initialised from the state of this builder.elementFacade
(IElementFacade elementFacade) Sets the interface through which XML elements are created and their attributes accessed.storeExcessiveIntegerAsFP
(boolean storeExcessiveIntegerAsFP) Sets or clears the flag that determines whether a JSON number that is deemed to be an integer but is too large to be stored as a signed 64-bit integer (ie, along
) will be stored as a double-precision floating-point number (ie, adouble
).
-
Method Details
-
elementFacade
Sets the interface through which XML elements are created and their attributes accessed.- Parameters:
elementFacade
- the interface through which XML elements will be created and their attributes accessed.- Returns:
- this builder.
-
storeExcessiveIntegerAsFP
Sets or clears the flag that determines whether a JSON number that is deemed to be an integer but is too large to be stored as a signed 64-bit integer (ie, along
) will be stored as a double-precision floating-point number (ie, adouble
).- Parameters:
storeExcessiveIntegerAsFP
- iftrue
a JSON number that is deemed to be an integer but is too large for along
will be stored as adouble
.- Returns:
- this builder.
-
build
Creates and returns a new instance of a JSON parser that is initialised from the state of this builder.- Returns:
- a new instance of a JSON parser.
-