Package com.restfb.util
Class StringJsonUtils
java.lang.Object
com.restfb.util.StringJsonUtils
Helper class to encapsulate simple checks used in the DefaultJsonMapper.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isEmptyList
(String jsonString) Is the given JSON equivalent to the empty list ([]
)?static boolean
isEmptyObject
(String jsonString) Is the given JSON equivalent to the empty object ({}
)?static boolean
Checks if the given String is equals to the String with the content"false"
static boolean
Checks if the given String start with a[
character, so it may be a JsonArraystatic boolean
Checks if the given String is equals to the String with the content"null"
static boolean
Checks if the given String start with a{
character, so it may be a JsonObject
-
Field Details
-
EMPTY_OBJECT
- See Also:
-
-
Method Details
-
isEmptyList
Is the given JSON equivalent to the empty list ([]
)?- Parameters:
jsonString
- The JSON to check.- Returns:
true
if the JSON is equivalent to the empty list,false
otherwise.
-
isList
Checks if the given String start with a[
character, so it may be a JsonArray- Parameters:
jsonString
- the JSON to check.- Returns:
true
if the String may be a JSON Array
-
isNull
Checks if the given String is equals to the String with the content"null"
- Parameters:
jsonString
- the JSON to check.- Returns:
true
if the String is"null"
-
isFalse
Checks if the given String is equals to the String with the content"false"
- Parameters:
jsonString
- the JSON to check.- Returns:
true
if the String is"false"
-
isObject
Checks if the given String start with a{
character, so it may be a JsonObject- Parameters:
jsonString
- the JSON to check.- Returns:
true
if the String may be a JSON object
-
isEmptyObject
Is the given JSON equivalent to the empty object ({}
)?- Parameters:
jsonString
- The JSON to check.- Returns:
true
if the JSON is equivalent to the empty object,false
otherwise.
-