#jsonb #diesel #pg

macro diesel_as_jsonb

Use your structs as Jsonb with diesel and PG

6 releases (2 stable)

1.0.1 Nov 11, 2023
1.0.0 Jun 14, 2022
0.1.3 Dec 7, 2021
0.1.2 Nov 14, 2018

#214 in Procedural macros

Download history 896/week @ 2024-01-05 499/week @ 2024-01-12 747/week @ 2024-01-19 1030/week @ 2024-01-26 852/week @ 2024-02-02 434/week @ 2024-02-09 554/week @ 2024-02-16 467/week @ 2024-02-23 1220/week @ 2024-03-01 1166/week @ 2024-03-08 695/week @ 2024-03-15 1049/week @ 2024-03-22 1465/week @ 2024-03-29 1267/week @ 2024-04-05 865/week @ 2024-04-12 783/week @ 2024-04-19

4,634 downloads per month

MIT license

4KB

Diesel As JSONB (for PG)

Usage

#[derive(AsJsonb)]]
struct Something {
    thing: String,
}

struct Wrapper {
    things: Vec<Something> // For field type Array<Jsonb>
    thing: Something // For field type Jsonb
}

Dependencies

~0.4–0.8MB
~20K SLoC