{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "PropertyList",
    "description": "This is the document root element. It contains a sequence of Property elements.",
    "items": {
        "$ref": "#/definitions/Property"
    },
    "type": "array",
    "definitions": {
        "Address": {
            "type": "object",
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "AttractionType": {
            "type": "object",
            "required": ["Name"],
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                }
            }
        },
        "AlsoKnownAs": {
            "type": "array",
            "properties": {
                "items": {"type": "string"}
            }
        },
        "SubCategory": {
            "type": "object",
            "required": ["Name"],
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                }
            }
        },
        "SubCategories": {
            "type": "array",
            "items": {"$ref": "#/definitions/SubCategory"},
            "minItems": 0
        },
        "Item": {
            "type": "object",
            "required": ["Name"],
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                }
            }
        },
        "Rating": {
            "type": "object",
            "required": [
                "Value",
                "Name",
                "ImageURL"
            ],
            "properties": {
                "Value": {"type": "number"},
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                },
                "ImageURL": {
                    "type": "string",
                    "format": "iri"
                }
            }
        },
        "SubRatings": {
            "type": "object",
            "required": ["Rating"],
            "properties": {
                "Rating": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Rating"},
                    "minItems": 1
                }
            }
        },
        "ListingStatus": {
            "type": "object",
            "required": ["Status"],
            "properties": {
                "Status": {"type": "string"},
                "ClosedDate": {"type": "string"},
                "ReopenDate": {"type": "string"}
            }
        },
        "GoodFor": {
            "type": "array",
            "items": {"type": "string"},
            "minItems": 0
        },
        "Category": {
            "type": "object",
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "DietName": {
            "type": "object",
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "Diet": {
            "type": "object",
            "required": ["Name"],
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/DietName"},
                    "minItems": 1
                }
            }
        },
        "NameAndLang": {
            "type": "object",
            "required": ["lang"],
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "Amenity": {
            "type": "object",
            "required": ["name"],
            "properties": {
                "name": {"type": "string"}
            }
        },
        "Amenities": {
            "type": "array",
            "items": {"$ref": "#/definitions/Amenity"},
            "minItems": 0
        },
        "Description": {
            "type": "object",
            "required": ["lang"],
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "SubTypeCategories": {
            "type": "array",
            "properties": {
                "items": {"type": "string"}
            }
        },
        "SpecialDiet": {
            "type": "object",
            "properties": {
                "Diet": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Diet"},
                    "minItems": 0
                }
            }
        },
        "AttractionTypes": {
            "type": "object",
            "properties": {
                "AttractionType": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/AttractionType"},
                    "minItems": 0
                }
            }
        },
        "RatingBreakdownItem": {
            "type": "object",
            "required": [
                "name",
                "numReviews",
                "score"
            ],
            "properties": {
                "name": {"type": ["string", "number"]},
                "numReviews": {"type": "number"},
                "score": {"type": "number"}
            }
        },
        "RatingBreakdown": {
            "type": "array",
            "items": {"$ref": "#/definitions/RatingBreakdownItem"},
            "minItems": 0
        },
        "Type": {
            "type": "object",
            "required": ["lang"],
            "properties": {
                "TypeName": {"type": "string"},
                "SubType": {"type": "integer"},
                "SubTypeName": {"type": "string"},
                "SubTypeCategories": {"$ref": "#/definitions/SubTypeCategories"},
                "AttractionTypes": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "PhoneNumber": {
            "type": "object",
            "required": ["type"],
            "properties": {
                "Number": {"type": "string"},
                "type": {"type": "string"}
            }
        },
        "GeoCode": {
            "type": "object",
            "properties": {
                "GeoCodeSource": {"type": "string"},
                "Latitude": {"type": "number"},
                "Longitude": {"type": "number"}
            }
        },
        "GeoCodes": {
            "type": "array",
            "items": { "$ref": "#/definitions/GeoCode" },
            "minItems": 0
        },
        "Popularity": {
            "type": "object",
            "properties": {
                "PopularityIndex": {"type": "integer"},
                "PopularityOutOf": {"type": "integer"},
                "PopularitySubtypeCategory": {"type": "string"},
                "PopularitySubtype": {"type": "integer"},
                "PopularitySubtypeOutOf": {"type": "integer"}
            }
        },
        "RankingData": {
            "type": "object",
            "required": [
                "RankingGeo",
                "RankingGeoId",
                "RankingPosition",
                "RankingDenominator",
                "Ranking"
            ],
            "properties": {
                "RankingGeo": {"type": "string"},
                "RankingGeoId": {"type": "string"},
                "RankingPosition": {"type": "string"},
                "RankingDenominator": {"type": "string"},
                "Ranking": {"type": "string"}
            }
        },
        "UserReviewRating": {
            "type": "object",
            "properties": {
                "name": {"type": "string"},
                "score": {"type": "number"},
                "total": {"type": "number"}
            }
        },
        "UserReviewRatings": {
            "type": "array",
            "items": {"$ref": "#/definitions/UserReviewRating"},
            "minItems": 0
        },
        "Price": {
            "type": "object",
            "required": [
                "minrate",
                "maxrate",
                "currency"
            ],
            "properties": {
                "minrate": {"type": "integer"},
                "maxrate": {"type": "integer"},
                "currency": {"type": "string"}
            }
        },
        "TripTypeBreakdownItem": {
            "type": "object",
            "properties": {
                "name": {"type": "string"},
                "numReviews": {"type": "number"}
            }
        },
        "TripTypeBreakdown": {
            "type": "array",
            "items": {"$ref": "#/definitions/TripTypeBreakdownItem"},
            "minItems": 0
        },
        "Award": {
            "type": "object",
            "properties": {
                "name": {"type": "string"},
                "categories": {"type":"array"},
                "tinyImageURL": {
                    "type": "string",
                    "format": "iri"
                },
                "smallImageURL": {
                    "type": "string",
                    "format": "iri"
                },
                "largeImageURL": {
                    "type": "string",
                    "format": "iri"
                },
                "type": {"type": "string"},
                "year": {"type": "integer"}
            }
        },
        "Awards": {
            "type": "array",
            "items": {"$ref": "#/definitions/Award"},
            "minItems": 1
        },
        "Time": {
            "type": "object",
            "required": [
                "OpenTime",
                "CloseTime"
            ],
            "properties": {
                "OpenTime": {"type": "string"},
                "CloseTime": {"type": "string"}
            }
        },
        "Day": {
            "type": "object",
            "required": ["DayName"],
            "properties": {
                "DayName": {"type": "string"},
                "Time": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Time"},
                    "minItems": 0
                }
            }
        },
        "Hours": {
            "type": "object",
            "required": [
                "Day",
                "TimeZone"
            ],
            "properties": {
                "Day": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Day"},
                    "minItems": 1
                },
                "TimeZone": {"type": "string"}
            }
        },
        "AlsoViewedItem": {
            "type": "object",
            "required": ["id"],
            "properties": {
                "id": {"type": "integer"}
            }
        },
        "AlsoViewed": {
            "type": "array",
            "items": {"$ref": "#/definitions/AlsoViewedItem"},
            "minItems": 0
        },
        "Safety": {
            "type": "object",
            "required": ["Name"],
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                }
            }
        },
        "TravelSafeData": {
            "type": "object",
            "properties": {
                "Safety": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Safety"},
                    "minItems": 0
                }
            }
        },
        "QuestionAndAnswersAuthor": {
            "type": "object",
            "properties": {
                "AuthorName": {"type": "string"},
                "Location": {"type": "string"}
            }
        },
        "QuestionAndAnswersAnswers": {
            "type": "array",
            "properties": {
                "Answer": {"type": "string"},
                "Author": {"$ref": "#/definitions/QuestionAndAnswersAuthor"},
                "DatePublished": {"type": "string"},
                "lang": {"type": "string"}
            },
            "minItems": 0
        },
        "QuestionAndAnswersAnswersItem": {
            "type": "object",
            "required": [
                "DatePublished",
                "Question",
                "Answers"
            ],
            "properties": {
                "DatePublished": {"type": "string"},
                "Question": {"type": "string"},
                "Author": {"$ref": "#/definitions/QuestionAndAnswersAuthor"},
                "Answers": {"$ref": "#/definitions/QuestionAndAnswersAnswers"},
                "AllAnswersToQuestionURL": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "QuestionsAndAnswers": {
            "type": "array",
            "items": {"$ref": "#/definitions/QuestionAndAnswersAnswersItem"},
            "minItems": 0
        },
        "Neighborhood": {
            "type": "object",
            "required": [
                "LocationId",
                "Name"
            ],
            "properties": {
                "LocationId": {"type": "integer"},
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                }
            }
        },
        "Neighborhoods": {
            "type": "array",
            "items": {"$ref": "#/definitions/Neighborhood"},
            "minItems": 0
        },
        "NearestMetroStation": {
            "type": "object",
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                },
                "Distance": {"type": "string"}
            }
        },
        "NearestMetroStations": {
            "type": "array",
            "items": {"$ref": "#/definitions/NearestMetroStation"},
            "minItems": 0
        },
        "LocationString": {
            "type": "object",
            "required": ["lang"],
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "Ancestor": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                },
                "id": {"type": "integer"},
                "level": {"type": "string"}
            }
        },
        "Ancestors": {
            "type": "array",
            "items": {"$ref": "#/definitions/Ancestor"},
            "minItems": 0
        },
        "Feature": {
            "type": "object",
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 1
                }
            }
        },
        "Features": {
            "type": "array",
            "items": {"$ref": "#/definitions/Feature"},
            "minItems": 0
        },
        "MealName": {
            "type": "object",
            "properties": {
                "Content": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "Meal": {
            "type": "object",
            "required": ["Name"],
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/MealName"},
                    "minItems": 1
                }
            }
        },
        "Meals": {
            "type": "object",
            "properties": {
                "Meal": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Meal"},
                    "minItems": 0
                }
            }
        },
        "RecommendedVisitLength": {
            "type": "object",
            "required": ["lang"],
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "Cuisine": {
            "type": "object",
            "required": ["Item"],
            "properties": {
                "Item": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Item"},
                    "minItems": 1
                }
            }
        },
        "LanguageReviewCounts": {
            "type": "object",
            "required": ["lang"],
            "properties": {
                "value": {"type": "string"},
                "lang": {"type": "string"}
            }
        },
        "Property": {
            "type": "object",
            "required": [
                "id",
                "geoid"
            ],
            "properties": {
                "Name": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/NameAndLang"},
                    "minItems": 0
                },
                "TripAdvisorURL": {"type": "string"},
                "ViewPhotosURL": {"type": "string"},
                "BookingURL": {"type": "string"},
                "WriteReviewURL": {"type": "string"},
                "AllQuestionsAndAnswersURL": {"type": "string"},
                "Category": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Category"},
                    "minItems": 0
                },
                "Type": {
                    "type": "object",
                    "items": {"$ref": "#/definitions/Type"},
                    "minItems": 0
                },
                "Description": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Description"},
                    "minItems": 0
                },
                "Address": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/Address"},
                    "description": "The street address of the location. Not applicable for location type: geographic.",
                    "minItems": 0
                },
                "GeoHierarchy": {
                    "type": "string",
                    "description": "NUM:NUM:Name|NUM:NUM:Name|... for the hierarchy of locations with this as the leaf"
                },
                "PhoneNumber": {
                    "type": "object",
                    "items": {"$ref": "#/definitions/PhoneNumber"},
                    "minItems": 0
                },
                "RoomCount": {
                    "type": "integer",
                    "description": "Number of rooms, if it's a hotel"
                },
                "PropertyURL": {"type": "string"},
                "Latitude": {"type": "number"},
                "Longitude": {"type": "number"},
                "GeoCodes": {"$ref": "#/definitions/GeoCodes"},
                "AverageRating": {
                    "type": "number",
                    "description": "Average rating on TripAdvisor"
                },
                "RawRating": {
                    "type": "number",
                    "description": "The raw rating used on TripAdvisor to determine ranking"
                },
                "RatingImageURL": {
                    "type": "string",
                    "description": "The rating image usable in search results"
                },
                "ReviewCount": {"type": "integer"},
                "Popularity": {"$ref": "#/definitions/Popularity"},
                "RankingData": {
                    "$ref": "#/definitions/RankingData",
                    "description": "Describes a POI's Popularity Index ranking on Tripadvisor, which compares places of interest (accomodations, restaurants, and attractions) within the same destination based on their popularity. This is measured by the quality, quantity, and recency of their review content on Tripadvisor."
                },
                "PhotoCount": {"type": "integer"},
                "UserReviewRatings": {"$ref": "#/definitions/UserReviewRatings"},
                "RatingBreakdown": {
                    "$ref": "#/definitions/RatingBreakdown",
                    "description": "Rating breakdown by number of reviews and rating"
                },
                "PriceLevel": {
                    "type": "string",
                    "description": "The relative price level for the POI. Not available for all POIs. This string is localized into select other currency symbols (e.g. ££££ or €€€€) if a language other than English (en_US) is requested or if a specific currency is selected."
                },
                "Closed": {
                    "type": "boolean",
                    "description": "Whether the property is closed, presence means this property is closed"
                },
                "Chain": {
                    "type": "string",
                    "description": "Chain information, if available, hotels only"
                },
                "Brand": {
                    "type": "string",
                    "description": "Brand information, if available, hotels only"
                },
                "Price": {"$ref": "#/definitions/Price"},
                "TripTypeBreakdown": {
                    "$ref": "#/definitions/TripTypeBreakdown",
                    "description": "TripType breakdown by number of reviews and rating"
                },
                "Amenities": {
                    "$ref": "#/definitions/Amenities",
                    "description": "Amenities offered by hotel"
                },
                "Awards": {"$ref": "#/definitions/Awards"},
                "OpenHours": {"type": "string"},
                "Hours": {
                    "$ref": "#/definitions/Hours",
                    "description": "Provides localized opening hours for Restaurants and Attractions, using ISO 8601 format."
                },
                "AlsoViewed": {"$ref": "#/definitions/AlsoViewed"},
                "GoodFor": {
                    "$ref": "#/definitions/GoodFor",
                    "description": "Good for romantic, doing business, local cuisine, etc, for restaurants only"
                },
                "AlsoKnownAs": {"$ref": "#/definitions/AlsoKnownAs"},
                "TravelSafeData": {
                    "$ref": "#/definitions/TravelSafeData",
                    "description": "The travel safe data provided by the management of this property"
                },
                "QuestionsAndAnswers": {"$ref": "#/definitions/QuestionsAndAnswers"},
                "Email": {"type": "string"},
                "Neighborhoods": {"$ref": "#/definitions/Neighborhoods"},
                "NearestMetroStations": {"$ref": "#/definitions/NearestMetroStations"},
                "LocationString": {
                    "type": "array",
                    "items": {"$ref": "#/definitions/LocationString"},
                    "minItems": 0
                },
                "Ancestors": {
                    "$ref": "#/definitions/Ancestors",
                    "description": "Ancestors describe where the POI or destination lives within the Tripadvisor destination or geo hierarchy. From this, you can derive the city where a POI is located, as well as state/province/region and country."
                },
                "AttractionTypes": {
                    "$ref": "#/definitions/AttractionTypes",
                    "description": "The attractions type classification, only for attractions"
                },
                "SubRatings": {"$ref": "#/definitions/SubRatings"},
                "SpecialDiet": {
                    "$ref": "#/definitions/SpecialDiet",
                    "description": "Special diets provided by this restaurant"
                },
                "Features": {
                    "$ref": "#/definitions/Features",
                    "description": "The features of this property"
                },
                "Meals": {
                    "$ref": "#/definitions/Meals",
                    "description": "Meals provided by this restaurant"
                },
                "SubCategories": {
                    "$ref": "#/definitions/SubCategories",
                    "description": "Listings that are accommodations/hotels or restaurants are assigned a single subcategory. Deprecated as of February 2017 for Attractions. Refer to the \"groups\" object for the most up to date classifications."
                },
                "Menu": {
                    "type": "string",
                    "format": "iri",
                    "description": "Menu information for restaurants"
                },
                "RecommendedVisitLength": {"$ref": "#/definitions/RecommendedVisitLength"},
                "Cuisine": {
                    "$ref": "#/definitions/Cuisine",
                    "description": "Cuisine information for the restaurants"
                },
                "LanguageReviewCounts": {
                    "$ref": "#/definitions/LanguageReviewCounts",
                    "description": "The amount of reviews in each language"
                },
                "ListingStatus": {"$ref": "#/definitions/ListingStatus"},
                "PartnerId": {
                    "type": "string",
                    "description": "The partner ID for the property, if there is a partner mapping associated with this feed."
                },
                "id": {
                    "type": "integer",
                    "description": "Unique Tripadvisor location ID of the destination or POI."
                },
                "geoid": {
                    "type": "integer",
                    "description": "The TripAdvisor id for the geo the location is included in."
                }
            }
        }
    }
}