public < T > T deserialize ( File file , TypeRef returnType ) throws ApiException { JavaType javaType = mapper . constructType ( returnType . getType ( ) ) ; try { return mapper . readValue ( file , javaType ) ; } catch ( IOException e ) { throw new ApiException ( 500 , e . getMessage ( ) , null , "File to read file" ) ; } }
Deserialize the given File to Java object .