Class JsonUtil


  • final class JsonUtil
    extends Object
    Implementation utilities (details) affecting the way JSON objects are wrapped. This class is copied from io.vertx.core.json.impl.JsonUtil as it is internal to Vert.x
    • Constructor Detail

      • JsonUtil

        JsonUtil()
    • Method Detail

      • wrapJsonValue

        public static Object wrapJsonValue​(Object val)
        Wraps well known java types to adhere to the Json expected types.
        • Map will be wrapped to JsonObject
        • List will be wrapped to JsonArray
        • Instant will be converted to iso date String
        • byte[] will be converted to base64 String
        • Enum will be converted to enum name String
        Parameters:
        val - java type
        Returns:
        wrapped type or val if not applicable.
      • checkAndCopy

        public static Object checkAndCopy​(Object val)