public static < T > T fromJson ( String json , Class < T > clazz ) { Objects . requireNonNull ( json , Required . JSON . toString ( ) ) ; Objects . requireNonNull ( clazz , Required . CLASS . toString ( ) ) ; T object = null ; try { object = mapper . readValue ( json , clazz ) ; } catch ( IOException e ) { LOG . error ( "Failed to convert json to object class" , e ) ; } return object ; }
Converts a given Json string to given Class