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

Default values being assigned to nullable/optional members #36

Open
Pxtl opened this issue Apr 22, 2021 · 1 comment
Open

Default values being assigned to nullable/optional members #36

Pxtl opened this issue Apr 22, 2021 · 1 comment

Comments

@Pxtl
Copy link

Pxtl commented Apr 22, 2021

Hiya, I love this program, but as I'm getting deeper into it I'm running into some bad pain-points.

If I open a json file with a given schema, and the type is

[
  "string",
  "null"
]

and save, it saves it as "" even if I didn't change anything. This is particularly bad if I have a format associated, since I get errors for violating the format... when I wouldn't violate the format if it had been left null or missing.

This is also bad for "format": "date-time" values, since there it's even setting in midnight year 0 when the value is supposed to be null.

@RicoSuter
Copy link
Owner

I’m not actively using and maintaining this app. Would you be willing to look into this issue and create a PR? Also we should update the used NJsonSchema version as there might be some bug fixes there as well.

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

No branches or pull requests

2 participants