sqlx-json
One trait, three backends. Turn any sqlx row into a serde_json::Value without writing per-column match arms. Built for dbmcp — the privacy first MCP server for SQL databases.
What you get
RowExt::to_object()andRowExt::to_entries()forSqliteRow,PgRow, andMySqlRow- Null-aware —
NULLcolumns becomeValue::Null, never panic - Binary-safe —
BYTEA/BLOBbase64-encoded; MySQLBINARY/VARBINARYemitted as text when valid UTF-8 - Precision-safe — numeric / decimal go through
BigDecimal - JSON / JSONB columns parsed and inlined as real JSON, not stringified
QueryResulttrait exposes.rows_affected()generically across backends- Tiny surface — one trait, two methods, no macros