{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "meta": {
            "type": "object",
            "properties": {
                "origin": {
                    "type": "string"
                },
                "date": {
                    "type": "string"
                },
                "marxs_version": {
                    "type": "string"
                },
                "format_version": {
                    "type": "integer"
                },
                "time": {
                    "type": "string"
                }
            },
            "required": [
                "origin",
                "date",
                "marxs_version",
                "format_version",
                "time"
            ]
        },
        "elements": {
            "type": "array",
            "items": {
                "oneOf": [
                    {
                        "$ref": "#/definitions/Element"
                    },
                    {
                        "$ref": "#/definitions/Bufferelement"
                    }
                ]
            }
        }
    },
    "required": [
        "meta",
        "elements"
    ],
    "definitions": {
        "Element": {
            "type": "object",
            "properties": {
                "materialproperties": {
                    "type": "object",
                    "properties": {
                        "color": {
                            "type": "string"
                        },
                        "opacity": {
                            "type": "number"
                        },
                        "side": {
                            "type": "integer"
                        },
                        "transparent": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "color"
                    ]
                },
                "name": {
                    "type": "string"
                },
                "geometry": {
                    "type": "string"
                },
                "material": {
                    "type": "string"
                },
                "n": {
                    "type": "integer"
                },
                "pos4d": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "number"
                        },
                        "maxItems": 16,
                        "minItems": 16
                    },
                    "minItems": 1
                }
            },
            "required": [
                "materialproperties",
                "name",
                "geometry",
                "material",
                "n",
                "pos4d",
                "geometrypars"
            ]
        },
        "Bufferelement": {
            "type": "object",
            "properties": {
                "materialproperties": {
                    "type": "object"
                },
                "name": {
                    "type": "string"
                },
                "geometry": {
                    "type": "string"
                },
                "geometrytype": {
                    "type": "string"
                },
                "material": {
                    "type": "string"
                },
                "n": {
                    "type": "integer"
                },
                "pos": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "number"
                        },
                        "minItems": 3
                    },
                    "minItems": 1
                },
                "faces": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "number"
                        },
                        "minItems": 3
                    },
                    "minItems": 1
                },
                "color": {
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "number"
                        },
                        "minItems": 3
                    },
                    "minItems": 1
                }
            },
            "required": [
                "materialproperties",
                "name",
                "geometry",
                "material",
                "n",
                "pos",
                "geometrytype"
            ]
        }
    }
}