Class JsonbUtil

java.lang.Object
net.bitnine.agensgraph.util.JsonbUtil

public class JsonbUtil extends Object
This class provides static methods to create Jsonb values.
  • Method Details

    • create

      public static Jsonb create(String value)
      Returns a Jsonb of the given string value.
      Parameters:
      value - the given value
      Returns:
      a Jsonb of the string value
    • create

      public static Jsonb create(int value)
      Returns a Jsonb of the given integer value.
      Parameters:
      value - the given value
      Returns:
      a Jsonb of the integer value
    • create

      public static Jsonb create(long value)
      Returns a Jsonb of the given long value.
      Parameters:
      value - the given value
      Returns:
      a Jsonb of the long value
    • create

      public static Jsonb create(double value)
      Returns a Jsonb of the given double value.
      Parameters:
      value - the given value
      Returns:
      a Jsonb of the double value
    • create

      public static Jsonb create(boolean value)
      Returns a Jsonb of the given boolean value.
      Parameters:
      value - the given value
      Returns:
      a Jsonb of the boolean value
    • createNull

      public static Jsonb createNull()
      Returns a Jsonb of null value.
      Returns:
      a Jsonb of null value
    • createArrayBuilder

      public static JsonbArrayBuilder createArrayBuilder()
      Returns a JsonbArrayBuilder to build an array.
      Returns:
      a JsonbArrayBuilder to build an array
    • createArray

      public static Jsonb createArray()
      Returns a Jsonb of an empty array.
      Returns:
      a Jsonb of an empty array
    • createArray

      public static Jsonb createArray(String... values)
      Returns a Jsonb of an array of the given strings.
      Parameters:
      values - a list of the given strings
      Returns:
      a jsonb of an array of the strings
    • createArray

      public static Jsonb createArray(Object... values)
      Returns a Jsonb of an array of the given objects.
      Parameters:
      values - a list of the given objects
      Returns:
      a jsonb of an array of the strings
    • createArray

      public static Jsonb createArray(Iterable<?> values)
      Returns a Jsonb of an array that has elements from the given iterable.
      Parameters:
      values - a list of the given iterable
      Returns:
      a jsonb of an array of the iterable
    • createObjectBuilder

      public static JsonbObjectBuilder createObjectBuilder()
      Returns a JsonbObjectBuilder to builder an object.
      Returns:
      a JsonbObjectBuilder to builder an object
    • createObject

      public static Jsonb createObject()
      Returns a Jsonb of an empty object.
      Returns:
      a Jsonb of an empty object
    • createObject

      public static Jsonb createObject(Map<String,?> map)
      Returns a Jsonb of an object that has properties from the given map.
      Parameters:
      map - the given map
      Returns:
      a Jsonb of an object that has properties from the given map