---
title: "Test MessagePack and CBOR Decoders with Known Data | Mochavi Payloads"
description: "Exercise binary response handling and decoder libraries with small checksummed MessagePack and CBOR fixtures generated from known records."
canonical: "https://payloads.mochavi.com/guides/messagepack-cbor-decoder-testing"
markdown_mirror: "https://payloads.mochavi.com/guides/messagepack-cbor-decoder-testing.md"
language: "en"
generated_from: "Payloads source content"
---

> Canonical HTML: [https://payloads.mochavi.com/guides/messagepack-cbor-decoder-testing](https://payloads.mochavi.com/guides/messagepack-cbor-decoder-testing)
>
> This machine-readable Markdown page mirrors the canonical Payloads documentation.

# Test MessagePack and CBOR Decoders with Known Data

Known binary inputs for testing buffers, media types, scalar preservation and decoder interoperability.

## Short answer

Payloads publishes the same users, projects and tasks collections as MessagePack and CBOR. Fetch the response as bytes, decode it with your library, then compare the result with the equivalent JSON fixture or canonical schema.

## Fetch bytes, not text

Calling response.text() corrupts the intent of the test. Keep the response as an ArrayBuffer, Uint8Array, Buffer or the equivalent byte container in your runtime.

**Browser binary response**

```js
const response = await fetch("https://payloads.mochavi.com/v1/users.msgpack");
const bytes = new Uint8Array(await response.arrayBuffer());
const users = decode(bytes); // your MessagePack decoder
```

## Use JSON as the readable oracle

The equivalent JSON collection gives reviewers a readable expected value without embedding opaque binary literals in the test. Compare the decoded domain values rather than the serialization bytes.

Use the manifest checksum when your test specifically needs to prove that the downloaded binary itself is unchanged.

| Binary fixture | Readable equivalent |
| --- | --- |
| /v1/users.msgpack | /v1/users.json |
| /v1/projects.cbor | /v1/projects.json |
| /v1/tasks.msgpack | /v1/tasks.json |

## What these fixtures can reveal

- Treating binary responses as strings.
- Incorrect Content-Type routing.
- Null, boolean and numeric coercion.
- Decoder differences across languages or libraries.
- Accidental truncation or transformation in a proxy.

## Open the binary references

- [MessagePack sample payloads](https://payloads.mochavi.com/formats/messagePack)
- [CBOR sample payloads](https://payloads.mochavi.com/formats/cbor)
- [JSON sample payloads](https://payloads.mochavi.com/formats/json)
- [Asset checksums](https://payloads.mochavi.com/v1/manifest.json)
