Class JsonUtils


  • public class JsonUtils
    extends java.lang.Object
    Class used to provide JSON common utils
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<com.fasterxml.jackson.databind.JsonNode> convertFromStringToJSONNode​(java.lang.String json)
      This method aim is to to evaluate if any possible String is a valid json or not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • convertFromStringToJSONNode

        public static java.util.Optional<com.fasterxml.jackson.databind.JsonNode> convertFromStringToJSONNode​(java.lang.String json)
        This method aim is to to evaluate if any possible String is a valid json or not. Given a json in String format, it try to convert it in a JsonNode. In case of success, i.e. the given string is a valid json, it put the JsonNode in a Optional. An empty Optional is passed otherwise.
        Parameters:
        json -
        Returns: