diesel-sqlite-struct-json-text 0.1.1

This proc macro attribute will allow you to store the target struct as json in TEXT field in diesel sqlite.
Documentation

Your cargo.toml

[dependencies]

diesel = { version="*", features= ["sqlite"]}

serde = {version = "*", features = ["derive"]}

serde_json = "*"

The target struct

#[diesel_sqlite_struct_json_text]
pub struct MyJson {
    pub my_item: String,
    pub my_item_2: i32
}

The database entity

#[diesel(table_name = crate::schema::my_entity)]
#[derive(Debug, Queryable, Selectable, Identifiable, Associations, PartialEq, Insertable)]
pub struct MyEntity {
    pub id: i32,
    pub my_json: MyJson
}

The schema

diesel::table! {
    my_entity (id) {
        id -> Integer,
        my_json -> Text
    }
}