Home > @rushstack/node-core-library > JsonFile > loadAndValidateWithCallback
JsonFile.loadAndValidateWithCallback() method
Loads a JSON file and validate its schema, reporting errors using a callback
Signature:
static loadAndValidateWithCallback(jsonFilename: string, jsonSchema: JsonSchema, errorCallback: (errorInfo: IJsonSchemaErrorInfo) => void, options?: IJsonFileLoadAndValidateOptions): JsonObject;
Parameters
Parameter | Type | Description |
---|---|---|
jsonFilename | string | |
jsonSchema | JsonSchema | |
errorCallback | (errorInfo: IJsonSchemaErrorInfo) => void | |
options | IJsonFileLoadAndValidateOptions | (Optional) |
Returns:
Remarks
See JsonSchema.validateObjectWithCallback() for more info.