title: Golang JSON encoding for parsing with JavaScript
body: <p>I have a struct like this:</p>
  
  <pre><code>type User struct {
    Login         string    `json:",string"`
    PasswordNonce Nonce     `json:",string"`
    PasswordHash  HashValue `json:",string"`
    CreatedOn     time.Time `json:",string"`
    Email         string    `json:",string"`
    PhoneNumber   string    `json:",string"`
    UserId        Id        `json:",string"`
  }
  </code></pre>
  
  <p>The code that generates the JSON and sends it is the following:</p>
  
  <pre><code>func AddUserHandler(w http.ResponseWriter, r *http.Request) {
      var userRecord model.User
      encoder := json.NewEncoder(w)
      err = encoder.Encode(userRecord)
      if err != nil {
          panic(err)
      }
  }
  </code></pre>
  
  <p>When I encode it with the Golang built in JSON encoder, the field names appear without quotes, which prevents the JSON.parse function in node.js from reading the content.
  Does anyone know a solution to that?</p>
  
  <p>Thanks!</p>