lib-orjson
OfficialFast & deterministic JSON serialization
Authorflext-sh
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Ensures consistent and high-performance JSON serialization, preventing data inconsistencies and improving processing speed in critical utility functions.
Core Features & Use Cases
- Deterministic Ordering: Guarantees that JSON output is always sorted by keys, essential for caching and comparisons.
- High Performance: Leverages the
orjsonlibrary for significantly faster serialization than the standardjsonmodule. - Robust Fallback: Includes a fallback to
json.dumpsfor unsupported types or serialization errors, maintaining stability. - Use Case: When serializing complex Python objects for cache keys or inter-service communication,
lib-orjsonensures that the resulting JSON strings are identical every time, preventing cache misses and ensuring reliable data exchange.
Quick Start
Ensure all orjson.dumps calls in flext-core/src/flext_core/_utilities/validation.py include option=orjson.OPT_SORT_KEYS and decode the output to a string using c.Utilities.DEFAULT_ENCODING.
Dependency Matrix
Required Modules
None requiredComponents
rules
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: lib-orjson Download link: https://github.com/flext-sh/flext/archive/main.zip#lib-orjson Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.