public class JSON
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BEGIN_ARRAY
Character that opens a JSON array sequence.
|
static int |
BEGIN_OBJECT
Character that opens a JSON object sequence.
|
static int |
END_ARRAY
Character that closes a JSON array sequence.
|
static int |
END_OBJECT
Character that closes a JSON object sequence.
|
static int |
ESCAPE_CHAR
Character that escapes special characters.
|
static int |
NAME_SEPARATOR
Character that separates an object field name from the value.
|
static int |
QUOTE_CHAR
Character that opens and closes JSON strings.
|
static int |
VALUE_SEPARATOR
Character that separates fields in an array or object.
|
static int[] |
WHITESPACE
Array of whitespace characters in a JSON format.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isNumber(java.lang.String str)
Check if a string represents a number according to RFC4627.
|
static boolean |
isWhiteSpace(int c)
Check if a character is whitespace according to the standard.
|
public static final int BEGIN_ARRAY
public static final int END_ARRAY
public static final int BEGIN_OBJECT
public static final int END_OBJECT
public static final int QUOTE_CHAR
public static final int NAME_SEPARATOR
public static final int VALUE_SEPARATOR
public static final int[] WHITESPACE
public static final int ESCAPE_CHAR
public static boolean isWhiteSpace(int c)
c
- int value of character to check.true
if the character is whitespace,
false
if notpublic static boolean isNumber(java.lang.String str)
str
- the string to checktrue
if the string matches the JSON
specification for a number, false
if not