Skip to content
Checkcraft
Checkcraft in practice

Validate JSON and XML API responses

JSON and XML carry different structures. Choosing the right extraction and path syntax makes the rule easier to understand and its failure easier to diagnose.

Checkcraft team · Updated

What you can verify

You will separate data extraction from value checks and see how a deliberate mismatch appears in the report.

Actual Checkcraft interface. This reference screenshot was recorded in Russian.
Actual Checkcraft interface. This reference screenshot was recorded in Russian. Full size ↗

Identify the actual body format

Inspect the response body rather than relying only on a file extension. JSON field rules use JSON paths. XML checks use the XML source and tag path expected by the selected step. A text field containing escaped JSON or XML may need extraction first.

Choose the rule for the requirement

Use value or type checks for individual fields and whitelists for allowed structure. Required fields need explicit checks. For repeated XML nodes or JSON array elements, use the corresponding loop instead of checking only one occurrence.

Keep a failing sample for each format

Change a value or remove a required element in a copy of the input. Run the same saved rules on the original and changed data. This distinguishes a useful validation rule from a test that passes regardless of the input.

Repeat the check with ready-made files

Download the Checkcraft test case and two inputs. One input is valid, and the other contains a deliberate error. These synthetic examples are available without registration.

Run the example in Checkcraft

Create a collection, a check and a test case using the workspace tree context menu. Click Import in the test case editor and choose the downloaded test case. Open the added case, copy the valid JSON, click Paste data for analysis, then Run test case. Open Result to inspect the report.

Repeat with the broken JSON without changing the rules. The first run should pass and the second should fail. If you see a different outcome, check the selected data source, imported steps and report.

The example files were executed against the application source on 14 September 2026. Reference reports recorded in Russian are available for the passing run and failing run. Sample names and literal data values do not change when you switch the interface language.

Try your own check

See the result on a small example first

Start with the sample, inspect the failure and then try a sanitized example from your own API. Free (beta) is available for Windows and Linux with no time limit.

Get Free (beta)Download and first run

An account and verified email are required to obtain the build. See the edition limits.