Closed metled closed 5 years ago
{
"title": "json schema",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "title for json",
},
"type": {
"type": "string",
"enum": ["object", "array", ...]
...
},
"properties": {
"type": "array"
...
}
}
}
is it possible?
Did you see the basic json-editor demo? https://json-editor.github.io/json-editor/
There is a schema text-area below the editor where you can edit the schema and update the editor.
Thanks, I understood that a user can edit the schema text to update the editor. My situation is that my users are not professional, that whether they can use an editor to generate the schema, i.e. json-editor can edit the schema based on the schema's schema.
@metled That should be possible and I'd really like to see an example for this. Actually the way you showed in the example looks good to me.
I googled for some existing "json-schema for json-schema", but haven't found a matching piece.
Work on this would be very appreciated.
Another starting point is feeding ie. http://json-schema.org/draft-04/schema# into the editor, which at least shows a working form... Example
Are you looking for this? http://json.bootsphp.com/jsonSchemaCreator/
@wclssdn Wow, this looks neat!
You can also start from a JSON of your choice and create a JSON Schema for the JSON Editor by https://niebert.github.io/JSON2Schema . The JSON2Schema
Tool used the JSON Editor developed by Jeremy Dorn to create the JSON Schema and finally you see the look of the JSON Editor in https://niebert.github.io/JSON2Schema . Because a JSON Schema is JSON too you might find the workflow from JSON to a JSON Schema useful.
Added info to Wiki.
Hi all, I've created a new issue relating to this one #299
The schema the original poster was referring to was the JSON Meta-Schema. It exists, and can be used in JSON-Editor to create/edit a schema. But, the editor has sub-optimal formatting, since the JSON Meta-Schema doesn't contain the fancy JSON-Editor specific formatting hints.
I'd like to have an editor letting users design the json schema, which could be used to produce the json-editor as the project. i.e. the super json schema -> editor for json schema -> editor for json