샘플
Serialize Infinity and NaN to valid JSON using Ajv JTD compileSerializer with specialNumbers
sha256:ad81da3e23ff9ca943d2bdf2e20b6ec713e6c014e97019f81d1ff823a68e62d7
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Serialize Infinity and NaN to valid JSON using Ajv JTD compileSerializer with specialNumbers HOW
- 패키지
- ajv 8.20.0
- 환경
- node
- 생성일
- 2026-08-16T06:23:03Z
컨트랙트
- compile a JTD serializer with float64 property under default settings
- assert default serialization emits unquoted Infinity and NaN literals causing JSON.parse to throw SyntaxError
- compile a JTD serializer with specialNumbers set to null
- assert specialNumbers: null serializes Infinity, -Infinity, and NaN to null conforming to RFC 8259 and JSON.stringify
- assert finite numbers continue to serialize normally
파일
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9