lib-orjson

Official

Fast & 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 orjson library for significantly faster serialization than the standard json module.
  • Robust Fallback: Includes a fallback to json.dumps for unsupported types or serialization errors, maintaining stability.
  • Use Case: When serializing complex Python objects for cache keys or inter-service communication, lib-orjson ensures 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 required

Components

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.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.