Diplomacy Game JSON Schema

The Game JSON Schema is a standard for storing and transmitting a complete set of data for a game of Diplomacy.  This includes game and competition information, player information, a summary of results, and order data.  Below is more readable guide followed by the full schema in the JSON standard form.  The schema can be downloaded by clicking here.  

A full sample is available without line breaks and in pretty form.

Some resources for JSON schema:

Guide

				
					Game: {
	Competition: string (Identifies the competition that the game is a part of),
	GameLabel: string (Identifies the game within the competition),
	URL: string (Source URL for the game, if available online),
	DatePlayed: string (Date the game was played, if played on a single day),
	DateBegan: string (Date the game began, if played on more than one day),
	DateEnded: string (Date the game ended, if played on more than one day),
	ScoringSystem: one of [Bangkok,Bangkok100,Carnage,Carnage100,Carnage21,CDiplo,CDiploNamur,CDiploRoundDown,CenterCountCarnage,Detour09,...] (The system used to score the game),
	Modality: one of [InPerson,Online] (How the game was conducted.),
	CommunicationType: one of [Full,PublicOnly,None] (Type of communication allowed.  PublicOnly is sometimes referred to as 'Wilson'.  No communication is commonly known as 'Gunboat'.),
	Language: one of [English,French,German] (What language the game was played in.),
	DeadlineType: one of [Live,Extended] (Live games typically have phases shorter than 30 minutes.  Extended deadline games usually have phases 12 hours or longer.),
	LimitType: one of [Unlimited,TimeLimited,YearLimited] (Whether there's a forced end.),
	AnonymityType: one of [None,Partial,Full] (Whether player identities are made public or not.  None: Players know who is playing which power.  Partial: Players know who is in the game but not who is playing which power.  Full: Players do not know anything about the other players.),
	EndedBy: one of [Unknown,Solo,Draw,Time,Year,GameManager,Other] (Specified how the game ended),
	Note: string (Any other information of relevance to the game.),
	Players: dict of <CountryEnum, string> (Player name by country),
	ResultSummary: dict of <CountryEnum, ResultSummaryLine> (Player result summary by country),
	GamePhases: array of GamePhase
}

WHERE

CountryEnum: one of [Austria,England,France,Germany,Italy,Russia,Turkey]
ProvinceEnum: one of [NAO,NWG,BAR,IRI,NTH,SKA,BOT,HEL,BAL,ENG,...]
ProvinceCoastEnum: one of [ec,wc,sc,nc]
UnitTypeEnum: one of [A,F]
Location: ProvinceEnum OR a 1- to 2-tuple [ProvinceEnum,ProvinceCoastEnum] (Represents a location on the map)
UnitWithLocation: a 2-tuple [UnitTypeEnum,Location] (Represents a unit at a particular location on the map)
DrawVote: {
	Passed: [required] boolean (True if everyone voted for the game to end),
	PlayersInDraw: array of CountryEnum (The players in the draw.  Some scoring systems allow players to agree to be excluded from the draw.  The default is to include all players with centers in the draw.),
	ProposedBy: CountryEnum,
	NumberOfKeepPlayingVotes: integer (The number of players voting to keep the game going, if that information is made public),
	KeepPlayingVoters: array of CountryEnum (The players voting to keep the game going, if that information is made public)
}
ResultSummaryLine: {
	CenterCount: [required] integer (The number of centers at the end of the game.),
	YearOfElimination: [required] integer (The year the player was eliminated.  Null if the player was not eliminated.  Some scoring systems depend on year of elimination.),
	InGameAtEnd: [required] boolean (True if the player soloed or survived and made the draw.  Note that some scoring systems allow players to survive without being included in a draw.),
	Score: [required] number (The player's score according to the scoring system.),
	Rank: [required] integer (The player's rank ignoring ties.  Note that some scoring systems rank eliminated players by year of elimination.)
}
HoldOrder: 'h' OR a 1-tuple ['h'] (Represents the portion of an order specific to hold orders)
MoveOrder: a 2-tuple ['m',Location] (Represents the portion of an order specific to move orders)
SupportHoldOrder: a 2-tuple ['sh',Location] (Represents the portion of an order specific to support-hold orders)
SupportMoveOrder: a 3-tuple ['sm',Location,Location] (Represents the portion of an order specific to support-move orders)
ConvoyOrder: a 3-tuple ['c',Location,Location] (Represents the portion of an order specific to convoy orders)
BuildOrder: a 2-tuple ['b',UnitWithLocation] (Represents the portion of an order specific to a build order)
DisbandOrder: 'd' OR a 1-tuple ['d'] (Represents the portion of an order specific to a disband order)
OrderResultEnum: one of [s,f] (Represents whether an order succeeded or failed)
OrderResult: OrderResultEnum OR a 1- to 2-tuple [OrderResultEnum,string] (Represents the result of an order with an optional reason)
Order: HoldOrder OR MoveOrder OR SupportHoldOrder OR SupportMoveOrder OR ConvoyOrder OR BuildOrder OR DisbandOrder
OrderAndResolution: a 2- to 3-tuple [ProvinceEnum,Order,OrderResult] (Represents an order and resolution.  A tuple with [Province, Order, Result].)
GamePhase: {
	Phase: [required] integer (A five digit integer representing the phase.  The first four digits represent the year and the last represents the phase (1-Spring, 2-Fall, 3-Winter).  For example, 19043 represents Winter, 1904.),
	Status: [required] one of [AwaitingOrders,AwaitingRetreats,Completed,GameEnded],
	DrawVote: DrawVote,
	CenterCounts: [required] dict of <CountryEnum, integer> (Indicates center counts for each country),
	SupplyCenters: dict of <CountryEnum, array of ProvinceEnum> (Indicates supply center ownership),
	Units: dict of <CountryEnum, array of UnitWithLocation> (Indicates unit types locations for each country.),
	Orders: dict of <CountryEnum, array of OrderAndResolution> (Indicates orders and resolutions for each power.  An array rather than a keyed list by province in order to allow multiple orders for the same province, which frequently occurs in person.),
	DislodgedUnits: array of ProvinceEnum (The locations of dislodged units),
	RetreatOrders: dict of <CountryEnum, array of OrderAndResolution> (Retreat orders and resolutions for each power.)
}

				
			

Schema

				
					{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://diplobn.com/GameJSON/2022-02/gameschema.json",
	"title": "Game",
	"description": "Represents all the game data for a game of Diplomacy",
	"type": "object",
	"properties": {
		"Competition": {
			"description": "Identifies the competition that the game is a part of",
			"type": "string"
		},
		"GameLabel": {
			"description": "Identifies the game within the competition",
			"type": "string"
		},
		"URL": {
			"description": "Source URL for the game, if available online",
			"type": "string"
		},
		"DatePlayed": {
			"description": "Date the game was played, if played on a single day",
			"type": "string"
		},
		"DateBegan": {
			"description": "Date the game began, if played on more than one day",
			"type": "string"
		},
		"DateEnded": {
			"description": "Date the game ended, if played on more than one day",
			"type": "string"
		},
		"ScoringSystem": {
			"description": "The system used to score the game",
			"enum": [
				"Bangkok",
				"Bangkok100",
				"Carnage",
				"Carnage100",
				"Carnage21",
				"CDiplo",
				"CDiploNamur",
				"CDiploRoundDown",
				"CenterCountCarnage",
				"Detour09",
				"DiploLigue",
				"Dixie",
				"DrawSize",
				"EDC2021",
				"HalfTribute",
				"ManorCon",
				"ManorConOriginal",
				"Manual",
				"MindTheGap",
				"OpenMindTheGap",
				"OpenTribute",
				"PoppyCon2021",
				"SemiTribute",
				"SimpleRank",
				"SimpleRankWithOE",
				"SumOfSquares",
				"SuperPastis",
				"Tribute",
				"Unscored",
				"Whipping",
				"WinNamur",
				"WorldClassic"
			]
		},
		"Modality": {
			"description": "How the game was conducted.",
			"enum": [
				"InPerson",
				"Online"
			]
		},
		"CommunicationType": {
			"description": "Type of communication allowed.  PublicOnly is sometimes referred to as 'Wilson'.  No communication is commonly known as 'Gunboat'.",
			"enum": [
				"Full",
				"PublicOnly",
				"None"
			]
		},
		"Language": {
			"description": "What language the game was played in.",
			"enum": [
				"English",
				"French",
				"German"
			]
		},
		"DeadlineType": {
			"description": "Live games typically have phases shorter than 30 minutes.  Extended deadline games usually have phases 12 hours or longer.",
			"enum": [
				"Live",
				"Extended"
			]
		},
		"LimitType": {
			"description": "Whether there's a forced end.",
			"enum": [
				"Unlimited",
				"TimeLimited",
				"YearLimited"
			]
		},
		"AnonymityType": {
			"description": "Whether player identities are made public or not.  None: Players know who is playing which power.  Partial: Players know who is in the game but not who is playing which power.  Full: Players do not know anything about the other players.",
			"enum": [
				"None",
				"Partial",
				"Full"
			]
		},
		"EndedBy": {
			"description": "Specified how the game ended",
			"enum": [
				"Unknown",
				"Solo",
				"Draw",
				"Time",
				"Year",
				"GameManager",
				"Other"
			]
		},
		"Note": {
			"description": "Any other information of relevance to the game.",
			"type": "string"
		},
		"Players": {
			"description": "Player name by country",
			"type": "object",
			"propertyNames": {
				"$ref": "#/$defs/CountryEnum"
			},
			"patternProperties": {
				"": {
					"type": "string"
				}
			}
		},
		"ResultSummary": {
			"description": "Player result summary by country",
			"type": "object",
			"propertyNames": {
				"$ref": "#/$defs/CountryEnum"
			},
			"patternProperties": {
				"": {
					"$ref": "#/$defs/ResultSummaryLine"
				}
			}
		},
		"GamePhases": {
			"type": "array",
			"items": {
				"$ref": "#/$defs/GamePhase"
			}
		}
	},
	"$defs": {
		"CountryEnum": {
			"enum": [
				"Austria",
				"England",
				"France",
				"Germany",
				"Italy",
				"Russia",
				"Turkey"
			]
		},
		"ProvinceEnum": {
			"enum": [
				"NAO",
				"NWG",
				"BAR",
				"IRI",
				"NTH",
				"SKA",
				"BOT",
				"HEL",
				"BAL",
				"ENG",
				"MAO",
				"LYO",
				"WES",
				"TYS",
				"ADR",
				"ION",
				"BLA",
				"AEG",
				"EAS",
				"Tyr",
				"Vie",
				"Tri",
				"Bud",
				"Boh",
				"Gal",
				"Cly",
				"Edi",
				"Lvp",
				"Wal",
				"Yor",
				"Lon",
				"Gas",
				"Bre",
				"Par",
				"Pic",
				"Bur",
				"Mar",
				"Kie",
				"Ruh",
				"Mun",
				"Ber",
				"Pru",
				"Sil",
				"Pie",
				"Ven",
				"Tus",
				"Rom",
				"Apu",
				"Nap",
				"Stp",
				"Lvn",
				"Mos",
				"War",
				"Ukr",
				"Sev",
				"Con",
				"Ank",
				"Arm",
				"Smy",
				"Syr",
				"Nwy",
				"Swe",
				"Fin",
				"Den",
				"Bel",
				"Hol",
				"Por",
				"Spa",
				"Naf",
				"Tun",
				"Ser",
				"Alb",
				"Rum",
				"Bul",
				"Gre"
			]
		},
		"ProvinceCoastEnum": {
			"enum": [
				"ec",
				"wc",
				"sc",
				"nc"
			]
		},
		"UnitTypeEnum": {
			"enum": [
				"A",
				"F"
			]
		},
		"Location": {
			"description": "Represents a location on the map",
			"oneOf": [
				{
					"$ref": "#/$defs/ProvinceEnum"
				},
				{
					"type": "array",
					"minItems": 1,
					"maxItems": 2,
					"items": [
						{
							"$ref": "#/$defs/ProvinceEnum"
						},
						{
							"$ref": "#/$defs/ProvinceCoastEnum"
						}
					]
				}
			]
		},
		"UnitWithLocation": {
			"description": "Represents a unit at a particular location on the map",
			"type": "array",
			"minItems": 2,
			"maxItems": 2,
			"items": [
				{
					"$ref": "#/$defs/UnitTypeEnum"
				},
				{
					"$ref": "#/$defs/Location"
				}
			]
		},
		"DrawVote": {
			"description": "Represents a draw vote during a GamePhase",
			"type": "object",
			"properties": {
				"Passed": {
					"description": "True if everyone voted for the game to end",
					"type": "boolean"
				},
				"PlayersInDraw": {
					"description": "The players in the draw.  Some scoring systems allow players to agree to be excluded from the draw.  The default is to include all players with centers in the draw.",
					"type": "array",
					"items": {
						"$ref": "#/$defs/CountryEnum"
					}
				},
				"ProposedBy": {
					"$ref": "#/$defs/CountryEnum"
				},
				"NumberOfKeepPlayingVotes": {
					"description": "The number of players voting to keep the game going, if that information is made public",
					"type": "integer"
				},
				"KeepPlayingVoters": {
					"description": "The players voting to keep the game going, if that information is made public",
					"type": "array",
					"items": {
						"$ref": "#/$defs/CountryEnum"
					}
				}
			},
			"required": [
				"Passed"
			]
		},
		"ResultSummaryLine": {
			"description": "Represents a summary of a individual player's result in the game.",
			"type": "object",
			"properties": {
				"CenterCount": {
					"description": "The number of centers at the end of the game.",
					"type": "integer"
				},
				"YearOfElimination": {
					"description": "The year the player was eliminated.  Null if the player was not eliminated.  Some scoring systems depend on year of elimination.",
					"type": [
						"integer",
						"null"
					]
				},
				"InGameAtEnd": {
					"description": "True if the player soloed or survived and made the draw.  Note that some scoring systems allow players to survive without being included in a draw.",
					"type": "boolean"
				},
				"Score": {
					"description": "The player's score according to the scoring system.",
					"type": "number"
				},
				"Rank": {
					"description": "The player's rank ignoring ties.  Note that some scoring systems rank eliminated players by year of elimination.",
					"type": "integer"
				}
			},
			"required": [
				"CenterCount",
				"YearOfElimination",
				"InGameAtEnd",
				"Score",
				"Rank"
			]
		},
		"HoldOrder": {
			"description": "Represents the portion of an order specific to hold orders",
			"oneOf": [
				{
					"const": "h"
				},
				{
					"type": "array",
					"minItems": 1,
					"maxItems": 1,
					"items": {
						"const": "h"
					}
				}
			]
		},
		"MoveOrder": {
			"description": "Represents the portion of an order specific to move orders",
			"type": "array",
			"minItems": 2,
			"maxItems": 2,
			"items": [
				{
					"const": "m"
				},
				{
					"$ref": "#/$defs/Location"
				}
			]
		},
		"SupportHoldOrder": {
			"description": "Represents the portion of an order specific to support-hold orders",
			"type": "array",
			"minItems": 2,
			"maxItems": 2,
			"items": [
				{
					"const": "sh"
				},
				{
					"$ref": "#/$defs/Location"
				}
			]
		},
		"SupportMoveOrder": {
			"description": "Represents the portion of an order specific to support-move orders",
			"type": "array",
			"minItems": 3,
			"maxItems": 3,
			"items": [
				{
					"const": "sm"
				},
				{
					"$ref": "#/$defs/Location"
				},
				{
					"$ref": "#/$defs/Location"
				}
			]
		},
		"ConvoyOrder": {
			"description": "Represents the portion of an order specific to convoy orders",
			"type": "array",
			"minItems": 3,
			"maxItems": 3,
			"items": [
				{
					"const": "c"
				},
				{
					"$ref": "#/$defs/Location"
				},
				{
					"$ref": "#/$defs/Location"
				}
			]
		},
		"BuildOrder": {
			"description": "Represents the portion of an order specific to a build order",
			"type": "array",
			"minItems": 2,
			"maxItems": 2,
			"items": [
				{
					"const": "b"
				},
				{
					"$ref": "#/$defs/UnitWithLocation"
				}
			]
		},
		"DisbandOrder": {
			"description": "Represents the portion of an order specific to a disband order",
			"oneOf": [
				{
					"const": "d"
				},
				{
					"type": "array",
					"minItems": 1,
					"maxItems": 1,
					"items": {
						"const": "d"
					}
				}
			]
		},
		"OrderResultEnum": {
			"description": "Represents whether an order succeeded or failed",
			"enum": [
				"s",
				"f"
			]
		},
		"OrderResult": {
			"description": "Represents the result of an order with an optional reason",
			"oneOf": [
				{
					"$ref": "#/$defs/OrderResultEnum"
				},
				{
					"type": "array",
					"minItems": 1,
					"maxItems": 2,
					"items": [
						{
							"$ref": "#/$defs/OrderResultEnum"
						},
						{
							"type": "string"
						}
					]
				}
			]
		},
		"Order": {
			"oneOf": [
				{
					"$ref": "#/$defs/HoldOrder"
				},
				{
					"$ref": "#/$defs/MoveOrder"
				},
				{
					"$ref": "#/$defs/SupportHoldOrder"
				},
				{
					"$ref": "#/$defs/SupportMoveOrder"
				},
				{
					"$ref": "#/$defs/ConvoyOrder"
				},
				{
					"$ref": "#/$defs/BuildOrder"
				},
				{
					"$ref": "#/$defs/DisbandOrder"
				}
			]
		},
		"OrderAndResolution": {
			"description": "Represents an order and resolution.  A tuple with [Province, Order, Result].",
			"type": "array",
			"minItems": 2,
			"maxItems": 3,
			"items": [
				{
					"$ref": "#/$defs/ProvinceEnum"
				},
				{
					"$ref": "#/$defs/Order"
				},
				{
					"$ref": "#/$defs/OrderResult"
				}
			]
		},
		"GamePhase": {
			"description": "Represents the full state of a phase in the game Diplomacy",
			"type": "object",
			"properties": {
				"Phase": {
					"description": "A five digit integer representing the phase.  The first four digits represent the year and the last represents the phase (1-Spring, 2-Fall, 3-Winter).  For example, 19043 represents Winter, 1904.",
					"type": "integer"
				},
				"Status": {
					"enum": [
						"AwaitingOrders",
						"AwaitingRetreats",
						"Completed",
						"GameEnded"
					]
				},
				"DrawVote": {
					"$ref": "#/$defs/DrawVote"
				},
				"CenterCounts": {
					"description": "Indicates center counts for each country",
					"type": "object",
					"propertyNames": {
						"$ref": "#/$defs/CountryEnum"
					},
					"patternProperties": {
						"": {
							"type": "integer"
						}
					}
				},
				"SupplyCenters": {
					"description": "Indicates supply center ownership",
					"type": "object",
					"propertyNames": {
						"$ref": "#/$defs/CountryEnum"
					},
					"patternProperties": {
						"": {
							"type": "array",
							"items": {
								"$ref": "#/$defs/ProvinceEnum"
							}
						}
					}
				},
				"Units": {
					"description": "Indicates unit types locations for each country.",
					"type": "object",
					"propertyNames": {
						"$ref": "#/$defs/CountryEnum"
					},
					"patternProperties": {
						"": {
							"type": "array",
							"items": {
								"$ref": "#/$defs/UnitWithLocation"
							}
						}
					}
				},
				"Orders": {
					"description": "Indicates orders and resolutions for each power.  An array rather than a keyed list by province in order to allow multiple orders for the same province, which frequently occurs in person.",
					"type": "object",
					"propertyNames": {
						"$ref": "#/$defs/CountryEnum"
					},
					"patternProperties": {
						"": {
							"type": "array",
							"items": {
								"$ref": "#/$defs/OrderAndResolution"
							}
						}
					}
				},
				"DislodgedUnits": {
					"description": "The locations of dislodged units",
					"type": "array",
					"items": {
						"$ref": "#/$defs/ProvinceEnum"
					}
				},
				"RetreatOrders": {
					"description": "Retreat orders and resolutions for each power.",
					"type": "object",
					"propertyNames": {
						"$ref": "#/$defs/CountryEnum"
					},
					"patternProperties": {
						"": {
							"type": "array",
							"items": {
								"$ref": "#/$defs/OrderAndResolution"
							}
						}
					}
				}
			},
			"required": [
				"Phase",
				"Status",
				"CenterCounts"
			]
		}
	}
}