+ protected static parseJsonSchemaFile<T extends JsonType>(
+ filePath: string,
+ ocppVersion: OCPPVersion
+ ): JSONSchemaType<T> {
+ try {
+ return JSON.parse(fs.readFileSync(filePath, 'utf8')) as JSONSchemaType<T>;
+ } catch (error) {
+ FileUtils.handleFileException(
+ filePath,
+ FileType.JsonSchema,
+ error as NodeJS.ErrnoException,
+ OCPPServiceUtils.logPrefix(ocppVersion),
+ { throwError: false }
+ );
+ }
+ }
+