sqjson 0.1.9

A simple JSON-based embedded database
Documentation
1
2
3
4
5
6
7
8
9
10
11
use sqjson::{YourDb, DbError};
use serde_json::json;

fn main() -> Result<(), DbError> {
    let mut db = YourDb::open("test.db")?;
    db.put("hello", &json!({ "msg": "world" }))?;
    db.flush()?;
    let val = db.get("hello")?;
    println!("{:?}", val);
    Ok(())
}