code: func MarshalProvisionToken(t ProvisionToken, opts ...MarshalOption) ([]byte, error) {
  	cfg, err := collectOptions(opts)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	type token1 interface {
  		V1() *ProvisionTokenV1
  	}
  	type token2 interface {
  		V2() *ProvisionTokenV2
  	}
  	version := cfg.GetVersion()
  	switch version {
  	case V1:
  		v, ok := t.(token1)
  		if !ok {
  			return nil, trace.BadParameter("don't know how to marshal %v", V1)
  		}
  		return utils.FastMarshal(v.V1())
  	case V2:
  		v, ok := t.(token2)
  		if !ok {
  			return nil, trace.BadParameter("don't know how to marshal %v", V2)
  		}
  		return utils.FastMarshal(v.V2())
  	default:
  		return nil, trace.BadParameter("version %v is not supported", version)
  	}
  }
docs: // MarshalProvisionToken marshals provisioning token into JSON.