public class JsonUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Boolean |
toBoolean(String text)
Parses a JSON formatted boolean from text.
|
static Number |
toNumber(String text)
Parses a JSON formatted number from text.
|
public static Boolean toBoolean(String text) throws IllegalArgumentException
text
- the text to parseBoolean
IllegalArgumentException
- if the text is not a valid booleanpublic static Number toNumber(String text) throws NumberFormatException
text
- the text to parseNumber
NumberFormatException
- if the text is not a valid number