title: golang json converts int to float. What can i do
body: <p>Here is my code. I'm reading from a JSON file and want to insert the value into my global variable mode.</p>
  <pre><code>    jsonFile, err := os.Open(&quot;config.json&quot;)
  if err != nil {
      log.Fatal(err)
      return err
  }
  //byteValue, _ := ioutil.ReadAll(jsonFile)
  
  var responseJson map[string]interface{}
  /*if err := json.NewDecoder(jsonFile).Decode(&amp;responseJson); err != nil {
      log.Fatal(err)
      return err
  }*/
  d := json.NewDecoder(jsonFile)
  d.UseNumber()
  d.Decode(&amp;responseJson)
  mode = responseJson[&quot;mode&quot;].(int)
  </code></pre>