code: func (sa *SessionArguments) MarshalJSON() (data []byte, err error) {
  	// Build a payload with only the non nil fields
  	tspv := reflect.ValueOf(*sa)
  	tspt := tspv.Type()
  	cleanPayload := make(map[string]interface{}, tspt.NumField())
  	var currentValue reflect.Value
  	var currentStructField reflect.StructField
  	for i := 0; i < tspv.NumField(); i++ {
  		currentValue = tspv.Field(i)
  		currentStructField = tspt.Field(i)
  		if !currentValue.IsNil() {
  			cleanPayload[currentStructField.Tag.Get("json")] = currentValue.Interface()
  		}
  	}
  	// Marshall the clean payload
  	return json.Marshal(cleanPayload)
  }
docs: // MarshalJSON allows to marshall into JSON only the non nil fields.
  // It differs from 'omitempty' which also skip default values
  // (as 0 or false which can be valid here).