範例
Inspect a compact MessagePack object used in binary APIs
Decode map, fixed strings, true and zero without guessing that the payload is compressed text.
輸入
48db87b4d769154b-compact.msgpack
18 bytes
下載Expected answer
JSON{
"compact": true,
"schema": 0
}{
"compact": true,
"schema": 0
}A compact feature-flag record
輸入
48db87b4d769154b7f67874c.bin
18 bytes
下載Expected answer
JSON{
"compact": true,
"schema": 0
}{
"compact": true,
"schema": 0
}A UTF-8 café label
輸入
d0bc6592ebee6aab3e8576b3.bin
23 bytes
下載Expected answer
JSON{
"name": "café",
"city": "Paris"
}{
"name": "café",
"city": "Paris"
}A negative sensor reading
輸入
78f7a42ed702a80ff82033f7.bin
23 bytes
下載Expected answer
JSON{
"station": "demo",
"celsius": -12
}{
"station": "demo",
"celsius": -12
}A decimal checkout amount
輸入
228e314175e73d21e8396253.bin
30 bytes
下載Expected answer
JSON{
"amount": 12.5,
"currency": "EUR"
}{
"amount": 12.5,
"currency": "EUR"
}A missing avatar
輸入
0151102037eb7b46eebc2115.bin
19 bytes
下載Expected answer
JSON{
"user": "demo",
"avatar": null
}{
"user": "demo",
"avatar": null
}A nested configuration
輸入
a9b9686ffeec16c43783d7d2.bin
24 bytes
下載Expected answer
JSON{
"server": {
"port": 443,
"tls": true
}
}{
"server": {
"port": 443,
"tls": true
}
}valid msgpack
輸入
d9ded31cbc4c7ec17697badb.bin
509 bytes
下載Expected answer
JSON{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
},
"newspaper": [
{
"format": "broadsheet",
"title": "Financial Times",
"price": 2.75
},
{
"format": "tabloid",
"title": "The Guardian",
"price": 2
}
]
}
}{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
},
"newspaper": [
{
"format": "broadsheet",
"title": "Financial Times",
"price": 2.75
},
{
"format": "tabloid",
"title": "The Guardian",
"price": 2
}
]
}
}no content
輸入
e3b0c44298fc1c149afbf4c8.bin
0 bytes
下載Expected rejection
Message containsCould not decode MessagePack to JSON