CodeSampleX

Beispiel

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

Verifiziertes Beispiel für gem json 2.9.1: Parse and serialize Ruby data structures with JSON.[] dispatch, decimal_class precision, custom container classes…

sha256:a87be603acbde77905b8b59ae00abe846be04ddcac05e754dcc29647170a50de

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
2
Deklarierte Umgebung ruby linux x64 ruby ruby rubygems

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
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

Fall

HOW
Ziel
Parse and serialize Ruby data structures with JSON.[] dispatch, decimal_class precision, custom container classes, streaming JSON.dump depth checks, and core type additions
Pakete
Symbole
  • JSON.[]
  • JSON.parse
  • JSON.dump
  • JSON.create_id
  • json/add/time
  • json/add/date
  • json/add/struct
  • json/add/set
  • json/add/symbol
Umgebung
ruby
Erstellt
2026-08-17T12:28:09Z

Contract

  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

Dateien

  • Gemfile
  • Gemfile.lock
  • NOTES.md
  • csx.json
  • src/json_features.rb
  • test/contract.rb

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed