title: Go getting failed field from UnmarshalTypeError
body: <p>According to GO stdlib, there is an error returned when JSON property type is different than struct's one. Here is definition:</p>
  
  <pre><code>// An UnmarshalTypeError describes a JSON value that was
  // not appropriate for a value of a specific Go type.
  type UnmarshalTypeError struct {
      Value  string       // description of JSON value - "bool", "array", "number -5"
      Type   reflect.Type // type of Go value it could not be assigned to
      Offset int64        // error occurred after reading Offset bytes
      Struct string       // name of the struct type containing the field
      Field  string       // name of the field holding the Go value
  }
  </code></pre>
  
  <p>Now, I'm trying to simulate a type conversion fail, by having an string field inside struct and providing int to this one.</p>
  
  <pre><code>import (
      "encoding/json"
      "fmt"
  )
  
  type Sample struct {
      StringProp string `json:"a_string"`
  }
  
  func main(){
      jsonString := `{ "a_string" : 1 }`
      s := Sample{}
      err := json.Unmarshal([]byte(jsonString), &amp;s)
      if err != nil {
          typeErr := err.(*json.UnmarshalTypeError)
          fmt.Print(typeErr.Field)
      }
  }
  </code></pre>
  
  <p>But unfortunately, the error doesn't have any values for "Struct" or "Field" property. What are these properties for?
  Is there a way to detect at which property unmarshal failed?</p>