> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MatchTicket (JSON)

> MatchTicket (JSON)

# MatchTicket (JSON)

代表配對票證的 JSON 物件，玩家可用來透過多人遊戲工作階段目錄 (MPSD) 尋找其他玩家。

<a id="ID4EN" />

MatchTicket JSON 物件具有下列規格。

| 成員 | 類型 | 描述 |
| - | - | - |
| serviceConfig | GUID | 工作階段的服務設定識別碼 (SCID)。 |
| hopperName | string | 應放置此票證之 Hopper 的名稱。 |
| giveUpDuration | 32 位元帶正負號的整數 | 最長等候時間 (整數秒數)。 |
| preserveSession | 列舉 | 指出是否必須重複使用該工作階段作為要配對進入之工作階段的值。可能的值為 "always" 或 "never"。 |
| ticketSessionRef | MultiplayerSessionReference | 玩家或群組目前正在遊玩之工作階段的 <b>MultiplayerSessionReference</b> 物件。此成員一律為必要。 |
| ticketAttributes | 物件陣列 | 使用者針對玩家票證提供的屬性和值集合。 |
| players | 物件陣列 | player 物件的集合，每個物件都有使用者提供之屬性的屬性包。 |

<a id="ID4EW" />

## 範例 JSON 語法

```json theme={null}
{
        "serviceConfig": "07617C5B-3423-4505-B6C6-10A16E1E5DDB",
        "hopperName": "TestHopper",
        "giveUpDuration": 10,
        "preserveSession": "never",
        "ticketSessionRef": {
        "scid": "AFFEABDF-0000-0000-0000-000000000001",
        "templateName": "TestTemplate",
        "sessionName": "5E551041-0000-0000-0000-000000000001"
    },
    "ticketAttributes": {
        "desiredMap": "Test Map",
        "desiredGameType": "Test GameType"
    },
    "players": [
        {
            "xuid": 123412345123,
            "playerAttributes": {
                "skill": 5,
                "ageRange": "teenager"
            }
        },
        {
          "xuid": 123412345124,
          "playerAttributes": {
              "skill": 15,
              "ageRange": "twenty-something"
          }
        }
      ]
    }
  
    
```

<a id="ID4EEB" />

## 另請參閱

<a id="ID4EGB" />

##### 上層

[JavaScript Object Notation (JSON) 物件參考](/zh-TW/reference/live/rest/json/atoc-xboxlivews-reference-json)


## Related topics

- [Using SmartMatch matchmaking](/services/xbox-services/multiplayer/matchmaking/concepts/live-matchmaking-how-tos.md)
- [Matchmaking overview](/services/xbox-services/multiplayer/matchmaking/live-matchmaking-overview.md)
- [Multiplayer tasks](/services/xbox-services/multiplayer/mpsd/how-to/live-mpsd-how-tos.md)
- [Multiplayer concepts overview](/services/xbox-services/multiplayer/concepts/live-multiplayer-concepts.md)
- [Matchmaking quickstart](/services/playfab/multiplayer/matchmaking/quickstart.md)
