Klasse StringJsonUtils

java.lang.Object
com.restfb.util.StringJsonUtils

public class StringJsonUtils extends Object
Helper class to encapsulate simple checks used in the DefaultJsonMapper.
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final String
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static 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
    isFalse(String jsonString)
    Checks if the given String is equals to the String with the content "false"
    static boolean
    isList(String jsonString)
    Checks if the given String start with a [ character, so it may be a JsonArray
    static boolean
    isNull(String jsonString)
    Checks if the given String is equals to the String with the content "null"
    static boolean
    isObject(String jsonString)
    Checks if the given String start with a { character, so it may be a JsonObject

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

  • Methodendetails

    • isEmptyList

      public static boolean isEmptyList(String jsonString)
      Is the given JSON equivalent to the empty list ([])?
      Parameter:
      jsonString - The JSON to check.
      Gibt zurück:
      true if the JSON is equivalent to the empty list, false otherwise.
    • isList

      public static boolean isList(String jsonString)
      Checks if the given String start with a [ character, so it may be a JsonArray
      Parameter:
      jsonString - the JSON to check.
      Gibt zurück:
      true if the String may be a JSON Array
    • isNull

      public static boolean isNull(String jsonString)
      Checks if the given String is equals to the String with the content "null"
      Parameter:
      jsonString - the JSON to check.
      Gibt zurück:
      true if the String is "null"
    • isFalse

      public static boolean isFalse(String jsonString)
      Checks if the given String is equals to the String with the content "false"
      Parameter:
      jsonString - the JSON to check.
      Gibt zurück:
      true if the String is "false"
    • isObject

      public static boolean isObject(String jsonString)
      Checks if the given String start with a { character, so it may be a JsonObject
      Parameter:
      jsonString - the JSON to check.
      Gibt zurück:
      true if the String may be a JSON object
    • isEmptyObject

      public static boolean isEmptyObject(String jsonString)
      Is the given JSON equivalent to the empty object ({})?
      Parameter:
      jsonString - The JSON to check.
      Gibt zurück:
      true if the JSON is equivalent to the empty object, false otherwise.