CodeSampleX

サンプル

json 2.9.1: Parse and serialize Ruby data structures with JSON.[] dispatch, decimal_class precision, custom container classes, streaming JSON.dump depth checks, and core type additions

検証済みサンプル — gem json 2.9.1: Parse and serialize Ruby data structures with JSON.[] dispatch, decimal_class precision, custom container classes, streaming…

sha256:a87be603acbde77905b8b59ae00abe846be04ddcac05e754dcc29647170a50de

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 ruby linux x64 ruby ruby rubygems

検証実行環境

環境 コントラクト ステージ 実行日
ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-17
ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-18

ケース

HOW
ゴール
Parse and serialize Ruby data structures with JSON.[] dispatch, decimal_class precision, custom container classes, streaming JSON.dump depth checks, and core type additions
パッケージ
シンボル
  • JSON.[]
  • JSON.parse
  • JSON.dump
  • JSON.create_id
  • json/add/time
  • json/add/date
  • json/add/struct
  • json/add/set
  • json/add/symbol
環境
ruby
作成日
2026-08-17T12:28:09Z

コントラクト

  1. assert JSON.[] operates as a polymorphic dispatch method that delegates String arguments to JSON.parse and non-String Ruby objects to JSON.generate
  2. assert JSON.parse with decimal_class: BigDecimal preserves exact arbitrary-precision decimal representations without IEEE 754 float rounding loss
  3. assert JSON.parse supports custom collection containers via array_class and object_class
  4. assert JSON.dump streams serialized output directly to IO destinations when provided and enforces strict recursion depth limits raising ArgumentError when exceeded
  5. assert requiring json/add core extensions enables bidirectional JSON serialization for Time, Date, Struct, Set, and Symbol types using create_additions: true
  6. 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