Class MapperJsonUtil


  • public final class MapperJsonUtil
    extends Object
    JSON Mapper utils.
    • Method Detail

      • parse

        public static <T> T parse​(String strJson,
                                  Class<T> t)
                           throws IOException
        parse the JSON for a bean.
        Type Parameters:
        T - The Bean class
        Parameters:
        strJson - The JSON
        t - The bean class
        Returns:
        The bean
        Throws:
        IOException - if an error occurs
      • getJson

        public static String getJson​(Object object)
                              throws IOException
        parse a bean into a json.
        Parameters:
        object - the object
        Returns:
        The json
        Throws:
        IOException - if an error occurs