# jsonconst
This package provides a Javascript library that you can call from your own code
const file = ;{ var json = file; var ts = jsonconst; file;}
JSON schema
Jsonconst
allows you to specify the JSON schema for your JSON file:
Doing so has a number of advantages, as listed below.
Catching type errors
Without a schema, any field can take any value:
With a schema, mistakes like the above are caught during compilation:
And if your editor supports JSON schemas, you will get error feedback when editing:
FIG
Intellisense
JSON schemas allow you to add descriptions to fields - and if your editor supports it, these descriptions willl be displayed:
FIG
The descriptions will also be passed on to code generation: