codesamplex

Sample

json.Marshal encodes byte slices as RFC 4648 Base64 strings but encodes fixed-size byte arrays as JSON numeric arrays, and json.Unmarshal rejects Base64 strings for byte arrays

sha256:c499e69e71bdececea5b130c2df41004fadce97b547d67885f2b0a211574cf36

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
json.Marshal encodes byte slices as RFC 4648 Base64 strings but encodes fixed-size byte arrays as JSON numeric arrays, and json.Unmarshal rejects Base64 strings for byte arrays HOW
Packages
encoding/json 1.26.5
Environment
go
Created
2026-08-16T13:06:14Z

Commonly assumed

json.Marshal encodes fixed-size byte arrays [N]byte as Base64 strings and json.Unmarshal decodes Base64 strings into byte arrays.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts