Class JsonUtil


  • public class JsonUtil
    extends Object
    • Method Detail

      • getJsonValue

        public static jakarta.json.JsonValue getJsonValue​(Object object)
                                                   throws jakarta.json.JsonException
        Converts an object to a JsonValue

        The object must be one of JsonValue, Collection, Map, String, Integer, Long, Double, Boolean, BigInteger, BigDecimal, a class that has a REST model or an array of one of the above.

        Parameters:
        object - The object to convert
        Returns:
        resulting JsonValue
        Throws:
        jakarta.json.JsonException - If the object cannot be converted to a JsonValue
      • appendUnicodeEscaped

        public static void appendUnicodeEscaped​(char ch,
                                                StringBuilder builder)