Home > @microsoft/node-core-library > JsonSchema > validateObject
JsonSchema.validateObject() method
Validates the specified JSON object against this JSON schema. If the validation fails, an exception will be thrown.
Signature:
validateObject(jsonObject: Object, filenameForErrors: string, options?: IJsonSchemaValidateOptions): void;
Parameters
Parameter | Type | Description |
---|---|---|
jsonObject | Object |
The JSON data to be validated |
filenameForErrors | string |
The filename that the JSON data was available, or an empty string if not applicable |
options | IJsonSchemaValidateOptions |
Other options that control the validation |
Returns:
void