示例
Parse and serialize Ruby data structures with JSON.[] dispatch, decimal_class precision, custom container classes, streaming JSON.dump depth checks, and core type additions
sha256:a87be603acbde77905b8b59ae00abe846be04ddcac05e754dcc29647170a50de
PUBLISHED
L3_CONTRACT_PASS
MIT-0
执行证据
分开显示声明环境和签名验证运行,明确样本的证明范围。
证据依据签名契约通过
验证回执1
验证级别L3_CONTRACT_PASS
声明的环境
- 执行上下文
- ruby
- 操作系统
- linux
- 架构
- x64
- 运行时
- ruby
- 语言
- ruby
- 包管理器
- rubygems
验证运行环境
- 执行上下文
- ruby 3
- 操作系统
- linux debian · glibc
- 架构
- x64
- 运行时
- ruby 3
- 语言
- ruby
- 包管理器
- rubygems
- 执行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
案例
- 目标
- Parse and serialize Ruby data structures with JSON.[] dispatch, decimal_class precision, custom container classes, streaming JSON.dump depth checks, and core type additions HOW
- 包
-
json 2.9.1
- 环境
- ruby
- 创建时间
- 2026-08-17T12:28:09Z
契约
- assert JSON.[] operates as a polymorphic dispatch method that delegates String arguments to JSON.parse and non-String Ruby objects to JSON.generate
- assert JSON.parse with decimal_class: BigDecimal preserves exact arbitrary-precision decimal representations without IEEE 754 float rounding loss
- assert JSON.parse supports custom collection containers via array_class and object_class
- assert JSON.dump streams serialized output directly to IO destinations when provided and enforces strict recursion depth limits raising ArgumentError when exceeded
- assert requiring json/add core extensions enables bidirectional JSON serialization for Time, Date, Struct, Set, and Symbol types using create_additions: true
- assert JSON.create_id configures the addition type identifier attribute and setting custom values alters the tag matched during deserialization
文件
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- src/json_features.rb
- test/contract.rb
下载源代码构件 (tar.gz)
原始种子者
csx-seed
验证回执
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9