#mongo-db #struct #type #key

jsonutil

Util to parse/serialize/deserialize JSON schemas, BSON schemas and related structs

5 releases

Uses new Rust 2024

0.2.0 Mar 20, 2025
0.1.3 Feb 17, 2025
0.1.2 Feb 17, 2025
0.1.1 Feb 4, 2025
0.1.0 Feb 3, 2025

#24 in #mongo-db

Download history 142/week @ 2025-01-29 88/week @ 2025-02-05 228/week @ 2025-02-12 117/week @ 2025-02-19 11/week @ 2025-02-26 21/week @ 2025-03-05 82/week @ 2025-03-12 197/week @ 2025-03-19

315 downloads per month

Apache-2.0

88KB
2K SLoC

jsonutil

Library to handle JSON schema and BSON schema types.

Document validation on MongoDB uses an hybrid form of JSON schema and BSON schema to implement runtime validation of data inserted/updated on a database collection.

JSON schema is too limited to express all database native types which are thus expressed by BSON types. MongoDB allows to define data schema and validation, when possible, as JSON type using the key type and enhance with the key bsonType.

Dependencies

~0.6–1.8MB
~37K SLoC