codesamplex

Sample

json.Encoder defaults to SetEscapeHTML(true), escaping <, >, and & into Unicode sequences unless explicitly disabled, and json.Marshal provides no option to disable this escaping.

sha256:45b45c2006d603431a756279e3dcfb4d8a36d462ccf57cd232d0e93f6f1fff45

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
json.Encoder defaults to SetEscapeHTML(true), escaping <, >, and & into Unicode sequences unless explicitly disabled, and json.Marshal provides no option to disable this escaping. HOW
Packages
encoding/json 1.26.5
Environment
go
Created
2026-08-16T13:20:01Z

Commonly assumed

A JSON encoder serializes string values using standard RFC 8259 character escaping, preserving literal <, >, and & characters unless HTML escaping is explicitly enabled.

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