{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://github.com/route4me/json-schemas/blob/master/geocoding.dtd",
    "type": "object",
    "title": "Geocoding",
    "properties": {
        "key": {
            "type": "string",
            "title": "Key",
            "description": "A unique identifier for the geocoding"
        },
        "name": {
            "type": "string",
            "title": "Name",
            "description": "Specific description of the geocoding result"
        },
        "bbox": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "lat": {
                        "type": "number",
                        "title": "Latitude",
                        "description": "Latitude"
                    },
                    "lng": {
                        "type": "number",
                        "title": "Longitude"
                    }
                }
            },
            "title": "Bbox",
            "description": "Boundary box"
        },
        "lat": {
            "type": "number",
            "title": "Latitude",
            "description": "Latitude"
        },
        "lng": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "title": "Longitude",
            "description": "Longitude"
        },
        "confidence": {
            "type": "string",
            "title": "Confidence",
            "description": "Confidence (\"high\", \"medium\", \"low\")"
        },
        "type": {
            "type": "string",
            "title": "Type",
            "description": "Non-standardized. Is used for tooltip (\"Street\", \"City\" etc)"
        },
        "postalCode": {
            "type": "string",
            "title": "Postal Code",
            "description": "If the result has a postal code, it's returned here"
        },
        "countryRegion": {
            "type": "string",
            "title": "Country Region",
            "description": "If the region is known, it's returned here"
        },
        "curbside_coordinates": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "lat": {
                        "type": "number",
                        "title": "Latitude",
                        "description": "Latitude"
                    },
                    "lng": {
                        "type": "number",
                        "title": "Longitude",
                        "description": "Longitude"
                    }
                }
            },
            "title": "Curbside Coordinates",
            "description": "Curbside Coordinates"
        }
    },
    "required": [
        "bbox",
        "lat",
        "lng"
    ]
}