Class JsonHandler

java.lang.Object
com.prineside.tdi2.utils.JsonHandler

public final class JsonHandler extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.badlogic.gdx.utils.JsonValue
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.badlogic.gdx.utils.JsonValue
    cloneJsonValue(com.badlogic.gdx.utils.JsonValue value)
     
    com.fasterxml.jackson.databind.json.JsonMapper
     
    i()
     
    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
    static com.badlogic.gdx.utils.JsonValue
    orEmptyObject(com.badlogic.gdx.utils.JsonValue v)
     
    static void
    setJsonValue(com.badlogic.gdx.utils.JsonValue what, com.badlogic.gdx.utils.JsonValue toWhat)
    Modifies 'what' in place.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EMPTY_JSON_OBJECT

      public static final com.badlogic.gdx.utils.JsonValue EMPTY_JSON_OBJECT
  • Method Details

    • i

      public static JsonHandler 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.