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

Add ability to skip uninitialized variables from being serialized #65

Open
null2264 opened this issue Sep 6, 2022 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@null2264
Copy link

null2264 commented Sep 6, 2022

Currently, uninitialized variables are being serialized as null:

{
  "id": "minecraft:cobblestone",
  "weight": 60,
  "dimensions": null
}

But it'd be great if I skip it and generate a much cleaner JSON file:

{
  "id": "minecraft:cobblestone",
  "weight": 60
}
@falkreon falkreon added the enhancement New feature or request label Sep 6, 2022
@falkreon falkreon self-assigned this Sep 6, 2022
@falkreon
Copy link
Owner

falkreon commented Sep 6, 2022

May be worth it to tag this for the 1.2.x branch so this can be available before the Document update.

@Barteks2x
Copy link

I would like at least an option to actually serialize them as null, as I want all the values in my json to be provided explicitly

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

3 participants