title: omitempty doesn't omit interface nil values in JSON
body: <p>I'm trying to omit nil interface values</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "encoding/json"
  )
  
  type MyStruct struct{
   Val interface{} `json:"val,omitempty"`
  }
  
  func main() {
      var s []string
      s = nil
      m := MyStruct{
      Val : s,
      }
  
      b, _:=  json.Marshal(m)
      fmt.Println(string(b))
  }
  </code></pre>
  
  <p>Here is the playground link <a href="https://play.golang.org/p/cAE1IrSPgm" rel="noreferrer">https://play.golang.org/p/cAE1IrSPgm</a>
  This outputs </p>
  
  <pre><code>{"val":null}
  </code></pre>
  
  <p>Why is it not treating it as an empty value? Is there a way to omit these nil values from json.</p>