golang API with echo framework
<p>I'm using a light framework web framework named echo (<a href="https://github.com/labstack/echo" rel="nofollow noreferrer">https://github.com/labstack/echo</a>) and I am trying to build a very simple API with it.</p>

<p>this is one of my routes</p>

<pre><code> e.Get("/v1/:channel/:username", getData)
</code></pre>

<p>this is the getData function it does a very simple SELECT from a mysql database</p>

<pre><code>func getData(c echo.Context) error {
  quote := new(Quote)  
  for rows.Next() {
        var username string
        var message string
        err = rows.Scan(&amp;username, &amp;message)
        checkErr(err)
        quote.username = username
        quote.message = message
  }
  log.Println(quote)

  defer rows.Close()
  return c.JSON(http.StatusOK, quote)
}
</code></pre>

<p>I also have this basic struct for the return value </p>

<pre><code>type Quote struct {
    username string
    message  string
}
</code></pre>

<p>Sadly I can't figure out how to return a JSON now. 
When I try this code the response from the server is always just <code>{}</code>
I tried return c.String which works fine and outputs a response but I would like to return a JSON.</p>

<p>I followed this example and can't really see the problem here.
<a href="https://github.com/labstack/echox/blob/master/recipe/crud/main.go" rel="nofollow noreferrer">https://github.com/labstack/echox/blob/master/recipe/crud/main.go</a></p>

<p>Any idea what I am doing wrong?</p>