codesamplex

Sample

Prove that Decoder.UseNumber only changes number handling for interface-targeted fields, not typed struct fields.

sha256:81a4cd6a66194dea6dee36b2313d64ce88e5fcb307768212adba5b506fdeb42d

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Prove that Decoder.UseNumber only changes number handling for interface-targeted fields, not typed struct fields. HOW
Packages
encoding/json go1.26.5
Environment
go
Created
2026-08-16T13:16:50Z

Commonly assumed

Using Decoder.UseNumber causes every decoded number to be produced as json.Number, even when decoding into a concrete numeric struct field.

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