public <T>T deserialise(String text,Class<T> clazz){
  try {
    T value=mapper.readValue(text,clazz);
    return value;
  }
 catch (  IOException e) {
    throw new IllegalStateException(MessageFormat.format("Failed to deserailise {0}",clazz.getSimpleName()),e);
  }
}

public < T > T deserialise ( String text , Class < T > clazz ) { try { T value = mapper . readValue ( text , clazz ) ; return value ; } catch ( IOException e ) { throw new IllegalStateException ( MessageFormat . format ( "Failed to deserailise {0}" , clazz . getSimpleName ( ) ) , e ) ; } }
deserialise json to an object of type t .
