How to add $schema to json dataset

Posted by cverbiest on 19-Apr-2019 09:25

I used to generate a json schema file for a json dataset we have.

If I add that schema to my json file, see , I get autocompletion in the vscode editor 

However read-json now refuses to read my json file.

Dataset name '$schema' in JSON does not match 'ScreenDefinition'. (15375)

Is there a way to add this info to the json file so that it will work for vscode, eclipse, etc. and still be readable by OpenEdge ?

"$schema": "cce-dev01/.../form.schema.json",
"ScreenDefinition": {

Those file are generally handwritten so I'm not so much concerned with the write-json part of the story.

All Replies

Posted by cverbiest on 19-Apr-2019 09:35

Maybe I should have tried a bit longer. I found a solution that seems to work, at least for vscode.

put $schema after the dataset instead of before.

"$schema": "http://.../form.schema.json"

The read-json error is gone and vscode still has autocompletion, see screenshot

This thread is closed