Short answer
What to know
Payloads generates JSON, XML, CSV, YAML, NDJSON, MessagePack, CBOR, text and HTML from one canonical dataset. The representation changes, while IDs, strings, nulls, booleans, numbers and relationships remain comparable.
Use equivalent collection URLs
Start with the users collection and change only the extension. This makes discrepancies easier to attribute to serialization or decoding rather than to different sample content.
https://payloads.mochavi.com/v1/users.json
https://payloads.mochavi.com/v1/users.xml
https://payloads.mochavi.com/v1/users.csv
https://payloads.mochavi.com/v1/users.yaml
https://payloads.mochavi.com/v1/users.msgpack
https://payloads.mochavi.com/v1/users.cborCompare meaning, not punctuation
JSON objects, XML elements and CSV rows do not have identical syntax or type systems. Normalize each decoded result into your application's domain shape before comparing it.
CSV is necessarily flatter than the object formats. XML carries explicit type information in the Payloads representation, while JSON, MessagePack and CBOR preserve native scalar values directly.
- Compare IDs and relationships after decoding.
- Define how an empty field differs from null in your importer.
- Normalize timestamps before comparing values.
- Keep Unicode and escaped markup in the test set.
A useful cross-format test matrix
| Concern | Fixtures to compare | What it catches |
|---|---|---|
| Text escaping | JSON, XML, CSV | Quotes, markup characters and delimiters |
| Scalar types | JSON, XML, YAML, CBOR | Boolean, number and null coercion |
| Line processing | CSV, NDJSON, text | Record boundaries and newline handling |
| Binary decoding | MessagePack, CBOR | Buffer handling and decoder configuration |
Validate against the canonical schema
The JSON Schema describes the canonical users, projects and tasks model. It is a useful reference for expected fields and relationships even when the wire format is not JSON.