Skip to content

Derive JSON Schema from document sample (Defer) #10

@IanMayo

Description

@IanMayo

@pmk65 made the great suggestion that the schema editor should be able to infer the schema from a sample document.

In the JSON-Editor context, "Update Form" populates the editor with the JSON document.

So, in this JSON-Schema-Editor context, it's a JSON Schema document that would be pasted into the "Output" text-area, and then the editor gets updated with that schema.

What @pmk65 is describing is a logical step further. He's describing a JSON document being pasted into a new text-area, then an algorithm parses the document to derive a JSON schema, then paste that content into the Output window, then re-populate the editor with the content of that schema.

I recognise the value in that process, but deriving the schema from the document is a step that's not currently perform in JSON-Editor (note - I think I've found JS code to do it here [1]).

It's a stretch target, but it's a great target to aim for :-)

[1]. #9 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions