CodeSampleX

Sample

Validate JSON with ShouldBindJSON and stop a Gin handler chain without falling through after Abort

sha256:403c56901efe4436738071fb04de2008bb9bb3d0785ec2d1be1216037744672e

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Validate JSON with ShouldBindJSON and stop a Gin handler chain without falling through after Abort HOW
Packages
github.com/gin-gonic/gin v1.12.0
Environment
go 1.26
Created
2026-08-17T03:14:37Z

Commonly assumed

AbortWithStatusJSON immediately returns from the current handler, so code after it cannot run and an explicit return is unnecessary.

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