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

Are there any plan add on-the-fly JSON Schema validation? #2724

Open
iseki0 opened this issue Jun 21, 2024 · 4 comments
Open

Are there any plan add on-the-fly JSON Schema validation? #2724

iseki0 opened this issue Jun 21, 2024 · 4 comments
Labels

Comments

@iseki0
Copy link
Contributor

iseki0 commented Jun 21, 2024

What is your use-case and why do you need this feature?
For the JSON format, do validation during deserialization is absolutely effecienct. Are there any plan or suggestion to complete it?

@iseki0 iseki0 added the feature label Jun 21, 2024
@sandwwraith
Copy link
Member

Can you elaborate, please? We do not have any integrations with Json Schema for now, any kind of advanced validation should happen in init {} block of serializable classes

@iseki0
Copy link
Contributor Author

iseki0 commented Jun 24, 2024

Thank you, I means if we can add some feature for it, compose the decoding and validation process, it will be more effeciency. Such as we needn't tokenize the input again.

In that case, JSON schema is a good choice, because it's standardized and widely supported.

@sandwwraith
Copy link
Member

I still don't get how it should look like. And what do you mean by 'needn't tokenize the input again.'? If you have your validation in init{}, it happens after the class is deserialized as usual.

@iseki0
Copy link
Contributor Author

iseki0 commented Jun 24, 2024

I understand we can do validation during class init, but here's a problem that it's not standardized and it can't cross platform.(I means programming language.).

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

No branches or pull requests

2 participants