Make database results JSON serializable again