Welcome to the BHoM_JSONSchema repository that hosts Json-Schemas for a majority of the objects defined in the object models across the BHoM organisation.
The Json schemas makes in possible to validate your serialised json objects to ensure they are compatible and able to be deserialised into the BHoM ecosystem.
If you like to get your BHoM oM included, please raise an Issue here.
The schemas can be validated using various existing JSON schema validators. This has so far been tested and ensured to be functioning with the following validators.
To use this tool, simply put the Id of the schema you want to evalusate against as a $ref
in the left hand pane, and the Json of the object you want to validate in the right hand pane. For example, to evaluate against a Line, put the following in the left hand side pane:
{
"$ref":"https://raw.githubusercontent.com/BHoM/BHoM_JSONSchema/develop/Geometry_oM/Line.json"
}
To find the Id of the object you want to validate, please locate the schema in the folders of this repo and look at the $id
property. Alternatively, you can navigate to the file in the browser and hit the "raw" button, and copy the link as the $ref
.
Use a similar process as with the jsonschemavalidator outlined above.
Has been tested and working for validation within the C# environment, building your custom evaluator.
This repository is in early stage of development and thereby prone to potential change, as well as not as deeply validated through the test of time. If you have any issues or ideas for improvement, please do raise an Issue here