Class MapperService

java.lang.Object
fr.paris.lutece.plugins.oauth2.service.MapperService

public final class MapperService extends Object
JSON Mapper utils
  • Method Details

    • 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
    • parse

      public static <T> T parse(String strJson, T bean) throws IOException
      parse the JSON for an existing bean
      Type Parameters:
      T - The Bean class
      Parameters:
      strJson - The JSON
      bean - The bean
      Returns:
      The bean
      Throws:
      IOException - if an error occurs
      Since:
      2.0.0