Home > @rushstack/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: JsonObject, filenameForErrors: string, options?: IJsonSchemaValidateOptions): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| jsonObject | JsonObject | 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 | (Optional) Other options that control the validation |
Returns:
void