Crate json_register

Crate json_register 

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

Enums§

JsonRegisterError
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.