title: How can I skip a field for json.Marshal & not for json.Unmarshal in go?
body: <pre><code>type Alpha struct { 
    Name            string `json:&quot;name&quot;`
    SkipWhenMarshal string `json:&quot;skipWhenMarshal&quot;`
  }
  
  func MarshalJSON(out interface{}){
    json.Marshal(out)
  } 
  </code></pre>
  <p>Is it possible to ignore the <strong>SkipWhenMarshal</strong> field when I do <strong>json.Marshal</strong> but not when I do
  <strong>json.Unmarshal</strong>.
  It should work for any type who calls <strong>MarshalJSON</strong></p>