CodeSampleX

Sample

Enforce JSON gem 2.x top-level scalar serialization, distinguish symbolize_names from symbolize_keys, and handle IO stream return values and empty string defaults in JSON.load

sha256:11b68ca217837cb2a5baf3ef7bd8bda4524866b9eccedef9840bab91c2e1098f

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Enforce JSON gem 2.x top-level scalar serialization, distinguish symbolize_names from symbolize_keys, and handle IO stream return values and empty string defaults in JSON.load HOW
Packages
json 2.9.1
Environment
ruby
Created
2026-08-17T02:44:27Z

Commonly assumed

JSON.generate and JSON.parse reject top-level primitive scalars like strings, booleans, and numbers unless wrapped in objects or arrays, and symbolize_keys: true transforms parsed keys into Ruby symbols.

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