Package com.prineside.tdi2.utils
Class JsonHandler
java.lang.Object
com.prineside.tdi2.utils.JsonHandler
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic com.badlogic.gdx.utils.JsonValuecloneJsonValue(com.badlogic.gdx.utils.JsonValue value) com.fasterxml.jackson.databind.json.JsonMapperstatic JsonHandleri()static booleanisJsonFile(com.badlogic.gdx.files.FileHandle fh) Does not validate the Json file contents, only checks if it is an existing file with one of the json extensions in namestatic com.badlogic.gdx.utils.JsonValueorEmptyObject(com.badlogic.gdx.utils.JsonValue v) static voidsetJsonValue(com.badlogic.gdx.utils.JsonValue what, com.badlogic.gdx.utils.JsonValue toWhat) Modifies 'what' in place.
-
Field Details
-
EMPTY_JSON_OBJECT
public static final com.badlogic.gdx.utils.JsonValue EMPTY_JSON_OBJECT
-
-
Method Details
-
i
-
getMapper
public com.fasterxml.jackson.databind.json.JsonMapper getMapper() -
orEmptyObject
public static com.badlogic.gdx.utils.JsonValue orEmptyObject(@Null com.badlogic.gdx.utils.JsonValue v) -
isJsonFile
public static boolean isJsonFile(com.badlogic.gdx.files.FileHandle fh) Does not validate the Json file contents, only checks if it is an existing file with one of the json extensions in name- Returns:
- true if file exists, is not a directory and has a json extension (.json / .json5 etc)
-
cloneJsonValue
public static com.badlogic.gdx.utils.JsonValue cloneJsonValue(com.badlogic.gdx.utils.JsonValue value) -
setJsonValue
public static void setJsonValue(com.badlogic.gdx.utils.JsonValue what, com.badlogic.gdx.utils.JsonValue toWhat) Modifies 'what' in place.
-