Community
Participate
Working Groups
It's a very big task, but it should be fantastic if WTP Validator could validate JSON file by using JSON Schema. To do that: * JSONSchemaDocument should support the full specification of JSON Schema. * minimal-json should be improved to collect line, column or perhaps we could use IJSONDocument to validate it with JSON Schema.
The patch includes the following: - a new preference - Window>Preferences>JSON>JSON Files>Validation>Enable Schema Validation The preference is false by default because this is a big change that could break the workspace. - a schema validation can be declared by adding the '$schema' property. You can, for instance, create a schema file as follows: { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "test": {} }, "patternProperties": { "^(/[^/]+)+$": {} }, "additionalProperties": false, "required": [ "test" ] } and use it in the following way: { "$schema": "file:///C:/Users/Snjeza/test.json", "test":{} } - validate the schema according to http://json-schema.org/latest/json-schema-validation.html
Gerrit change: https://git.eclipse.org/r/83559
Gerrit change https://git.eclipse.org/r/83559 was merged to [master]. Commit: http://git.eclipse.org/c/sourceediting/webtools.sourceediting.git/commit/?id=8dbc9a2c02ee97da10a47b2842960f6a2a64accf