Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe support jsonschema #19

Open
jmosbacher opened this issue Jul 31, 2022 · 3 comments
Open

Maybe support jsonschema #19

jmosbacher opened this issue Jul 31, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@jmosbacher
Copy link
Owner

JSONSchema can easily be converted to pydantic models which can then be edited. Would require a bit of complexity as we would have to generate the models in memory using e.g. fsspec, import them dynamically and them use them for conversion to and from json.

Probably will implement on if requested explicitly. If you would be interested in such a thing, please add a comment.

@jmosbacher jmosbacher added the enhancement New feature or request label Jul 31, 2022
@simontaurus
Copy link

Just found your project while researching for potential connections between pydantic and panel/params. We use jsonschemas to be more language independent, e. g. to also use javascript bases application like https://github.com/json-editor/json-editor, so jsonschema support would be an interesting option.

@jmosbacher
Copy link
Owner Author

jmosbacher commented Oct 1, 2023

Hi, thanks for the interest.
Can you give a little more details on your use case?
The main problem this package solves is handling arbitrary python objects and two way sync for pydantic model objects.
It sounds like maybe you dont want to use pydantic models at all and just generate widgets from a jsonschema, which is almost trivial to implement so this package maybe would be overkill for you.

@simontaurus
Copy link

Thanks for your response. We built pydantic classes from jsonschema and our code on top of this. If we built panel classes/widgets directly from jsonschema I guess we would have a separate disconnected data model. So if we have jsonschema => pydantic already in place you would recommend going directly from pydantic to panels using this package as it is? The mentioned sync provided by this package would allow us to write the same data processing code regardless of whether data comes from a static source, API or is manipulated via panels by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants