Expand description
§JSON Register
json-register is a library for registering JSON objects into a PostgreSQL database
with canonicalisation and caching. It ensures that semantically equivalent JSON objects
are stored only once and assigned a unique identifier.
This library provides both a Rust API and Python bindings.
Structs§
- Cache
- A thread-safe Least Recently Used (LRU) cache.
- Db
- Handles database interactions for registering JSON objects.
- Register
- The main registry structure that coordinates database interactions and caching.
- Telemetry
Metrics - A snapshot of all telemetry metrics.
Enums§
- Json
Register Error - Errors that can occur during JSON registration.
Functions§
- build_
connection_ string - Builds a PostgreSQL connection string from its components.
- canonicalise
- Converts a JSON object to its canonical string representation.
- sanitize_
connection_ string - Sanitizes a connection string by replacing the password with asterisks.