Map SQLite3 data to JSON in a configurable way