{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "Attribute": {
            "type": "object",
            "properties": {
                "attribute": {
                    "description": "Name of the attribute",
                    "type": "string"
                },
                "values": {
                    "description": "List of values of the attribute",
                    "type": "number"
                }
            }
        }
    },
    "Sample": {
        "type": "object",
        "properties": {
            "id": {
                "description": "ID of the sample",
                "type": "string"
            },
            "lon": {
                "description": "WGS84 longitude",
                "type": "number"
            },
            "lat": {
                "description": "WGS84 latitude",
                "type": "number"
            },
            "label": {
                "description": "Name of the sample",
                "type": "string"
            },
            "timeline": {
                "description": "List of dates",
                "type": "array",
                "_uniqueItems": true,
                "items": {
                    "type": "string"
                }
            },
            "validdata": {
                "description": "List of 0 (false) and 1 (true) representing the valid observations",
                "type": "array",
                "items": {
                    "type": "integer"
                }
            },
            "attributes": {
                "description": "List of attributes",
                "type": "array",
                "items": {
                    "$ref": "#/definitions/Attribute"
                }
            }
        }
    },
    "required": [
        "Attribute",
        "Sample"
    ],
    "properties": {
        "Attribute": {
            "$ref": "#/definitions/Attribute"
        },
        "Sample": {
            "$ref": "#/Sample"
        }
    }
}