json-schema-filter
json-schema-filter copied to clipboard
GeoJSON not supported
trafficstars
I think there is a clash because the GeoJSON object has a object called properties.
Here's my schema, all objects under a geojson.features[0].properties are being included instead of only name/id like I want. So the schema is ignored. Working for geometry though...
var schema = {
"title": "Simple GeoJSON Schema",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"features":{
"type": "array",
"required": true,
"items": {
"type": "object",
"required": true,
"properties": {
"type": {
"type": "string"
},
"geometry": {
"type": "object",
"required": true,
"items": {
"type": "object",
"required": true,
"properties": {
"type": {
"type": "string",
"required": true
},
"coordinates": {
"type": "array",
"required": true
}
}
}
},
"properties": {
"type": "object",
"required": true,
"items": {
"type":"object",
"required":true,
"properties": {
"name": {
"type": "string",
"required": true
},
"id": {
"type": "string",
"required": true
}
}
}
}
}
}
}
},
"required": ["geometry", "properties"]
};
Hey, I think if I understand correctly, geoJSON definition conflicts with the JSONSchema standard? Are we talking about a specific exception or standards issue here? I will read up more on this, but wondering if is more a conflict with geoJSON and JSONScema issue?