code: private JsonObject loadModuleConfig(ModuleIdentifier modID, File modJsonFile) {
      try (@SuppressWarnings("resource") Scanner scanner = new Scanner(modJsonFile, "UTF-8").useDelimiter("\\A")) {
        return new JsonObject(scanner.next());
      } catch (FileNotFoundException e) {
        throw new PlatformManagerException("Module " + modID + " does not contains a mod.json file");
      } catch (NoSuchElementException e) {
        throw new PlatformManagerException("Module " + modID + " contains an empty mod.json");
      } catch (DecodeException e) {
        throw new PlatformManagerException("Module " + modID + " mod.json contains invalid json");
      }
    }
docs: Loads configuration information for a module from mod.json.