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 single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite.
What you get
RowExt::to_json()forSqliteRow,PgRow, andMySqlRow- Null-aware —
NULLcolumns becomeValue::Null, never panic - Binary-safe —
BYTEA/BLOB/VARBINARYbase64-encoded - 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