JSON¶
- Status:
● Tested
- Functions:
3
- Category:
JSON Data Validation
The JSON testset provides comprehensive JSON file testing capabilities for ADARE experiments. This testset focuses on JSON structure validation, key existence checking, value comparison, and array element verification.
Overview¶
The JSON testset enables detailed validation of JSON files and data structures. It includes functions to check for key existence using dot notation paths, validate values with support for wildcards and regular expressions, and verify array contents with flexible matching options.
Test Functions¶
Function Name |
S |
Description |
Parameters |
|---|---|---|---|
● |
Tests if JSON file contains specified key path (supports dot notation like “user.profile.name”) |
dst (str); key_path (str) |
|
● |
Tests if JSON value at key path matches expected value using placeholders (supports wildcards [*] and * with any/all modes) |
dst (str), key_path (str), expected_value (str/int/float/bool), regex_match* (bool), wildcard_mode* (str) |
|
● |
Tests if JSON array at specified path contains expected element |
dst (str), array_path (str), expected_element (str/int/float/bool/dict/list) |