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

Ability to disable parsing/serialization from a class #7

Open
Reprevise opened this issue Dec 30, 2022 · 2 comments
Open

Ability to disable parsing/serialization from a class #7

Reprevise opened this issue Dec 30, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Reprevise
Copy link

It would be nice to be able to disable generating serialization or parsing code as such:

@Json(toJson: false, fromJson: true) // or some other names
class MyModel {
  // ...
}

It would also be useful to add a property for disabling the list methods. This should also be configurable from the build.yaml.

@simc
Copy link
Owner

simc commented Dec 31, 2022

I'd like to keep the library as simple and easy to use as possible. What is the advantage in disabling the generation of certain code? Tree shaking will remove it if you don't use it anyway.

@Reprevise
Copy link
Author

I don't see how adding the ability to disable parsing/serialization of code makes it more complicated, especially if both are enabled by default. 99% of my classes don't require serialization so when I would write CrimsonWriter(bytes)., I would get a lot of method suggestions that I don't need. I understand its not a must have, but it is a nice-to-have.

@simc simc added the enhancement New feature or request label Jan 6, 2023
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