{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "rating_history": {
            "type": "array",
            "items": {
                "type": "integer"
            }
        },
        "score_history": {
            "type": "object",
            "patternProperties": {
                "^\\d+$": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "player_id": {
                                "type": "integer"
                            },
                            "score": {
                                "type": "integer"
                            },
                            "rating_delta": {
                                "type": "number"
                            },
                            "place": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "player_id",
                            "score",
                            "rating_delta",
                            "place"
                        ]
                    }
                }
            }
        },
        "players_info": {
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "display_name": {
                        "type": "string"
                    },
                    "tenhou_id": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "display_name",
                    "tenhou_id"
                ]
            }
        },
        "places_summary": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "1": {
                    "type": "integer"
                },
                "2": {
                    "type": "integer"
                },
                "3": {
                    "type": "integer"
                },
                "4": {
                    "type": "integer"
                }
            },
            "required": [
                "1",
                "2",
                "3",
                "4"
            ]
        },
        "total_played_games": {
            "type": "integer"
        },
        "total_played_rounds": {
            "type": "integer"
        },
        "win_summary": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "ron": {
                    "type": "integer"
                },
                "tsumo": {
                    "type": "integer"
                },
                "chombo": {
                    "type": "integer"
                },
                "feed": {
                    "type": "integer"
                },
                "tsumofeed": {
                    "type": "integer"
                },
                "openhand": {
                    "type": "integer"
                }
            },
            "required": [
                "ron",
                "tsumo",
                "chombo",
                "feed",
                "tsumofeed"
            ]
        },
        "hands_value_summary": {
            "type": "object",
            "patternProperties": {
                "^-?\\d+$": {
                    "type": "integer"
                }
            }
        },
        "yaku_summary": {
            "type": "object",
            "patternProperties": {
                "^\\d+$": {
                    "type": "integer"
                }
            }
        },
        "riichi_summary": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "riichi_won": {
                    "type": "integer"
                },
                "riichi_lost": {
                    "type": "integer"
                },
                "feed_under_riichi": {
                    "type": "integer"
                }
            },
            "required": [
                "riichi_won",
                "riichi_lost",
                "feed_under_riichi"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "rating_history",
        "score_history",
        "players_info",
        "places_summary",
        "total_played_games",
        "total_played_rounds",
        "win_summary",
        "hands_value_summary",
        "yaku_summary",
        "riichi_summary"
    ]
}