Home > @microsoft/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): any;

Parameters

Parameter Type Description
jsonFilename string  
jsonSchema JsonSchema  
errorCallback (errorInfo: IJsonSchemaErrorInfo) => void  

Returns:

any

Remarks

See JsonSchema.validateObjectWithCallback() for more info.