A regular expression that can match a valid JSON number.
A regular expression that can match a valid JSON number.
This has four match groups:
The negative sign, fractional part and exponent part are optional matches and may be null
.
Parse a JSON number from a String
.
Parse a JSON number from a String
.
A string is valid if it conforms to the grammar in section 2.4 of the
JSON specification. If it is valid, then the number is
returned in a Some
. Otherwise the number is invalid and None
is returned.
a JSON number encoded as a string
a JSON number if the string is valid
Return a JsonNumber
whose value is the valid JSON number in value
.
Return a JsonNumber
whose value is the valid JSON number in value
.
This value is not verified to be a valid JSON string. It is assumed that value
is a
valid JSON number, according to the JSON specification. If the value is invalid the behavior is
undefined. This operation is provided for use in situations where the validity of the input has
already been verified.
Constructors, type class instances, and other utilities for JsonNumber.