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

Provide an option to the SerializeBuilder to set AccessType to a specified value globally #1025

Closed
rrajkomar opened this issue Dec 30, 2018 · 3 comments

Comments

@rrajkomar
Copy link

Say for example that I have a project with 50-like serializable classes.
Each class has its own serialization annotations to be converted to xml and/or json

If I want to make all classes use the "public-method" AccessType, I currently have to go on each of the 50 classes to add the annotation.

Could it be possible to add a setting to the SerializerBuilder so that in one call I can set the default accessor Type Strategy to public-method (for any call that uses that serializer)

@goetas
Copy link
Collaborator

goetas commented Dec 31, 2018

This kind of defaults has been discussed in schmittjoh/JMSSerializerBundle#427 and decided to not allow similar changes

@goetas
Copy link
Collaborator

goetas commented Dec 31, 2018

Not sure if we should apply the same policy here

@goetas
Copy link
Collaborator

goetas commented Dec 31, 2018

Third party libraries could rely on a default that is not true anymore

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