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

Clarification about NullSchema #1441

Closed
egekorkan opened this issue Mar 17, 2022 · 5 comments · Fixed by #1457
Closed

Clarification about NullSchema #1441

egekorkan opened this issue Mar 17, 2022 · 5 comments · Fixed by #1457
Assignees
Labels
Editorial Issues with no technical impact on implementations PR needed

Comments

@egekorkan
Copy link
Contributor

I have just realized that we do not explain what null really means. What we currently say is:

Metadata describing data of type null. This Subclass is indicated by the value null assigned to type in DataSchema instances. This Subclass describes only one acceptable value, namely null. It can be used as part of a oneOf declaration, where it is used to indicate, that the data can also be null.

It means something specific in JSON Schema. I think this needs rewording since even our text can mean that type:null means lack of payload.

@relu91
Copy link
Member

relu91 commented Mar 18, 2022

I think this needs rewording since even our text can mean that type:null means lack of payload.

is it? we have an open issue asking to have this ability: #1234.
From the text you cited above I don't understand that specifying null actually indicates the absence of value and it seems quite aligned to what is specified in the JSON Schema spec you cited. What do I miss?

@egekorkan
Copy link
Contributor Author

Well the problem is that we keep saying null but do not explain what null means. My idea is to add something like "It’s important to remember that in JSON, null isn’t equivalent to something being absent." like JSON Schema does. Maybe putting links to the programming language concepts would be also nice

@sebastiankb sebastiankb added Editorial Issues with no technical impact on implementations PR needed labels Apr 1, 2022
@sebastiankb
Copy link
Contributor

good point. @egekorkan would you provide a PR proposal?

@danielpeintner
Copy link
Contributor

My idea is to add something like "It’s important to remember that in JSON, null isn’t equivalent to something being absent." like JSON Schema does.

Doing so would not solve #1234 right?
Shall we tackle this use-case as part of it?

@egekorkan
Copy link
Contributor Author

Doing so would not solve #1234 right?

Sadly not, I think that needs a separate keyword to properly describe the optionalness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editorial Issues with no technical impact on implementations PR needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants