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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisEmptyList(String jsonString) Is the given JSON equivalent to the empty list ([])?static booleanisEmptyObject(String jsonString) Is the given JSON equivalent to the empty object ({})?static booleanChecks if the given String is equals to the String with the content"false"static booleanChecks if the given String start with a[character, so it may be a JsonArraystatic booleanChecks if the given String is equals to the String with the content"null"static booleanChecks 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:
trueif the JSON is equivalent to the empty list,falseotherwise.
-
isList
Checks if the given String start with a[character, so it may be a JsonArray- Parameters:
jsonString- the JSON to check.- Returns:
trueif 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:
trueif 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:
trueif 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:
trueif the String may be a JSON object
-
isEmptyObject
Is the given JSON equivalent to the empty object ({})?- Parameters:
jsonString- The JSON to check.- Returns:
trueif the JSON is equivalent to the empty object,falseotherwise.
-