client-api/src/main/java/com/streamsets/datacollector/client/JSON.java
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");
    }
  }
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");
    }
  }
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.

@param file The File path
@param returnType The type to deserialize inot
@return The deserialized Java object
Deserialize the given File to Java object .