Exemplo
orjson 3.12.0: Serialize and deserialize data with orjson handling bytes return type, bitmask option flags instead of stdlib kwargs, non-string dict keys, and native dataclass/UUID/datetime support
Amostra verificada para pypi orjson 3.12.0: Serialize and deserialize data with orjson handling bytes return type, bitmask option flags instead of stdlib…
sha256:020e06fb410676e34ab53ed4e3734a8f3ae84c4a47d5e61fbfa1744e5a92934d
Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu.
Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas.
MIT-0
Evidência de execução
O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.
- Base da evidência
- Contrato assinado aprovado
- Recibos de verificação
- 2
- Chaves de assinatura que o compilaram
- 2
Ambiente declarado
python linux x64 python python pip
Ambientes das execuções de verificação
| Ambiente | Contrato | Etapas | Execução |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-16 |
| python 3.12 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-18 |
Caso
HOW- Objetivo
- Serialize and deserialize data with orjson handling bytes return type, bitmask option flags instead of stdlib kwargs, non-string dict keys, and native dataclass/UUID/datetime support
- Pacotes
- Símbolos
-
- orjson.dumps
- orjson.loads
- orjson.OPT_INDENT_2
- orjson.OPT_SORT_KEYS
- orjson.OPT_NON_STR_KEYS
- orjson.OPT_UTC_Z
- orjson.OPT_APPEND_NEWLINE
- Ambiente
- python
- Criado
- 2026-08-16T07:09:03Z
Contrato
- assert orjson.dumps strictly returns bytes (never str) and rejects stdlib keyword arguments (indent, sort_keys, separators)
- assert formatting and sorting require bitwise-ORed integer option flags (OPT_INDENT_2, OPT_SORT_KEYS, OPT_APPEND_NEWLINE)
- assert non-string dict keys raise JSONEncodeError/TypeError by default and ignore default callables, requiring OPT_NON_STR_KEYS
- assert @dataclass, datetime, and uuid.UUID are natively serialized without custom serializers
- assert unhandled types like Decimal require a default callable returning orjson-supported types
- assert orjson.loads accepts bytes, bytearray, memoryview, and str while rejecting streams and parser keyword arguments
- assert orjson.JSONDecodeError subclasses ValueError and json.JSONDecodeError, and JSONEncodeError subclasses TypeError
Arquivos
- NOTES.md
- csx.json
- requirements.txt
- src/__init__.py
- src/serializer.py
- test/contract.py