サンプル
Serialize zoneinfo timezone offsets, omit microsecond precision, convert non-finite floats to JSON null, and parse zero-copy memoryview slices while rejecting UTF-8 BOM headers
sha256:63d3cb47ac13fab75182e87dc04cac17093434eda1c074745454e702d7b392d3
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- python
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- python
- 言語
- python
- パッケージマネージャー
- pip
検証実行環境
- 実行コンテキスト
- python 3.12
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- python 3.12
- 言語
- python
- パッケージマネージャー
- pip
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
ケース
- ゴール
- Serialize zoneinfo timezone offsets, omit microsecond precision, convert non-finite floats to JSON null, and parse zero-copy memoryview slices while rejecting UTF-8 BOM headers HOW
- パッケージ
-
orjson 3.12.0
- 環境
- python
- 作成日
- 2026-08-17T17:57:16Z
よくある思い込み
orjson.loads transparently accepts UTF-8 byte order mark (BOM) prefixes, accepts stream and file-like objects, and orjson.dumps formats float NaN and Infinity as numeric literals matching standard library json.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- orjson.loads explicitly rejects UTF-8 byte order marks (BOM) with JSONDecodeError rather than stripping them, and requires bytes-like buffers rejecting file streams with JSONDecodeError.
- assert orjson.dumps strictly serializes float NaN, Infinity, and -Infinity to JSON null rather than stdlib json non-standard literal tokens
- assert orjson.loads rejects raw NaN and Infinity tokens with JSONDecodeError adhering to RFC 8259
- assert zoneinfo.ZoneInfo timezone-aware datetimes serialize with exact UTC offsets including daylight saving adjustments
- assert OPT_OMIT_MICROSECONDS strips microsecond precision from both datetime.datetime and datetime.time objects
- assert orjson.loads parses zero-copy memoryview buffer slices without intermediate allocations or copies
- assert orjson.JSONDecodeError subclasses ValueError and json.JSONDecodeError, and JSONEncodeError subclasses TypeError
ファイル
- NOTES.md
- csx.json
- requirements.txt
- src/__init__.py
- src/parser.py
- test/contract.py
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9