샘플
Preserve 64-bit integer precision and decode untyped YAML numbers in sigs.k8s.io/yaml using JSONOpt UseNumber
sha256:b26c17ad7a69e13b5a7bcb2b075acafb7bf6062ad327a7370e9eea24f586f98e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Preserve 64-bit integer precision and decode untyped YAML numbers in sigs.k8s.io/yaml using JSONOpt UseNumber HOW
- 패키지
- sigs.k8s.io/yaml v1.4.0
- 환경
- go
- 생성일
- 2026-08-16T13:22:35Z
흔히 이렇게 알고 있다
sigs.k8s.io/yaml.Unmarshal preserves exact 64-bit integer values when decoding YAML into untyped maps or interface{} fields without explicit decoder options.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- assert default Unmarshal silently truncates integers above 2^53 into float64 whereas JSONOpt UseNumber preserves exact int64 values as json.Number
- assert types implementing yaml.Unmarshaler are ignored while json.Unmarshaler and encoding.TextUnmarshaler are executed
- assert YAML numbers and booleans are coerced to strings when target struct fields are string type
- assert unmarshaling into map[interface{}]interface{} fails with JSON unmarshal error unlike standard YAML decoders
파일
- NOTES.md
- csx.json
- go.mod
- go.sum
- yaml_config_test.go
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-16 · ed25519:d91480838ac982c9