{
    "$schema": "http://json-schema.org/draft-04/schema",
    "definitions": {
        "graph": {
            "additionalProperties": false,
            "properties": {
                "directed": {
                    "default": true,
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "edges": {
                    "items": {
                        "additionalProperties": false,
                        "properties": {
                            "directed": {
                                "default": true,
                                "type": [
                                    "boolean",
                                    "null"
                                ]
                            },
                            "id": {
                                "type": "string"
                            },
                            "label": {
                                "type": "string"
                            },
                            "metadata": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "rel": {
                                "type": "string"
                            },
                            "source": {
                                "type": "string"
                            },
                            "target": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "source",
                            "target"
                        ],
                        "type": "object"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "id": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                },
                "metadata": {
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "nodes": {
                    "items": {
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "label": {
                                "type": "string"
                            },
                            "metadata": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id"
                        ],
                        "type": "object"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "type": {
                    "type": "string"
                }
            },
            "required": [
                "id"
            ],
            "type": "object"
        }
    },
    "oneOf": [
        {
            "additionalProperties": false,
            "properties": {
                "graph": {
                    "$ref": "#/definitions/graph"
                }
            },
            "required": [
                "graph"
            ],
            "type": "object"
        },
        {
            "additionalProperties": false,
            "properties": {
                "graphs": {
                    "items": {
                        "$ref": "#/definitions/graph"
                    },
                    "type": "array"
                },
                "id": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                },
                "metadata": {
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "type": {
                    "type": "string"
                }
            },
            "type": "object"
        }
    ]
}