title: Rows to map to JSON using sqlx package
body: <p>Trying to get the result into a JSON string, I have to use <code>MapScan</code> because i have no structs that represent the data so here is what i did</p>
  
  <pre><code>import (
      "fmt"
      "log"
      "encoding/json"
      _ "github.com/jmoiron/sqlx"
      _ "github.com/go-sql-driver/mysql"
  )
  
  func main() {
      db, err := sqlx.Connect("mysql", "uname:pwd@/db")
      if err != nil {
          log.Fatal(err)
      }
  
      m := map[string]interface{}{}
  
      //Go through rows
      rows, err := db.Queryx("SELECT id,cname FROM items")
      for rows.Next() {
          err := rows.MapScan(m)
          if err != nil {
              log.Fatal(err)
          }
      }
  
      //Marshal the map
      b, _ := json.Marshal(m)
  
      //Prints the resulted json
      fmt.Printf("Marshalled data: %s\n", b)
  }
  </code></pre>
  
  <p>The output is <code>Marshalled data: {"cname":"c29tZWl0ZW0","id":"MA=="}</code></p>
  
  <p>and it should be <code>Marshalled data: {"cname":"someitem","id":0}</code></p>
  
  <p>and I am not sure how to go around this since the values returned in <code>base64</code> encodig, any ideas?</p>