title: Golang map containing both string and integer
body: <p>I am trying to create a JSON string from a map using JSON.Marshal() in golang. However, the int values are being displayed as strings surrounded by double quotes.</p>
  
  <p>My code is outputting:</p>
  
  <pre><code>{ "age":
      {
          "$gt":"22",
          "$lt":"20"
      },
    "location":
      {
          "$eq":"london"
      },
    "name":{
          "$eq":"fred"
      }
  }
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>{ "age":
      {
          "$gt":22,
          "$lt":20
      },
    "location":
      {
          "$eq":"london"
      },
    "name":{
          "$eq":"fred"
      }
  }
  </code></pre>
  
  <p>I am using:</p>
  
  <pre><code>var output_map = map[string]map[string]string{}
  
  //Populate map here
  
  output_json, err := json.Marshal(output_map)
  
  if err!= nil {
      fmt.Println("Error encoding JSON")
  }
  
  fmt.Println(output_json)
  </code></pre>
  
  <p>My understanding is that JSON.Marshal() will print the integers correctly if they are supplied but my map won't contain integers. I could change my map to map[string]map[string]int{} but then it wouldn't contain the string values for 'name' and 'location'.</p>
  
  <p>The ultimate problem is that I need the map to contain both int and string values. Some sort of map[string]map[string]{}.</p>
  
  <p>How can I achieve this? Thank you in advance.</p>
  
  <p>Harry</p>