code: private Object parseFile(File file, String scharset) {
          Charset charset = scharset==null || scharset.length ()==0 ? StandardCharsets.UTF_8 : Charset.forName ( scharset );
  
          if (file.length() > 2_000_000) {
              try (Reader reader = Files.newBufferedReader( Classpaths.path(file.toString()), charset )) {
                  return parse(reader);
              } catch(IOException ioe) {
                  throw new JsonException("Unable to process file: " + file.getPath(), ioe);
              }
          } else {
              try {
                  return JsonFactory.create().fromJson ( Files.newBufferedReader( Classpaths.path(file.toString()), charset ) );
              } catch ( IOException e ) {
                  throw new JsonException("Unable to process file: " + file.getPath(), e);
              }
          }
      }
docs: Slight changes to remove groovy dependencies .