Skip to main content

VerifyJSON

This Script is part of the Common Scripts Pack.#

Supported versions

Supported Cortex XSOAR versions: 5.5.0 and later.

Verifies if the supplied JSON string is valid and optionally verifies against a provided schema. The script utilizes Powershell's Test-JSON cmdlet.

Script Data#


NameDescription
Script Typepowershell
TagsJSON, Utility
Cortex XSOAR Version5.5.0

Inputs#


Argument NameDescription
jsonJSON string to verfiy.
schemaOptional schema against which to validate the JSON input.

Outputs#


PathDescriptionType
VerifyJSON.ResultWhether the passed JSON was verified.boolean

Script Example#

!VerifyJSON json={"alert_id":"695b3238-05d6-4934-86f5-9fff3201aeb0"}

Context Example#

{
"VerifyJSON": {
"Result": true
}
}

Human Readable Output#

Verify JSON completed successfully