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

Ignore serialization of default values #45

Open
tomershohet opened this issue Apr 30, 2018 · 2 comments
Open

Ignore serialization of default values #45

tomershohet opened this issue Apr 30, 2018 · 2 comments

Comments

@tomershohet
Copy link

Hi,
I'm serializing a big amount of data.
My serialized strings are getting huge, double digits of MBs, because the serialization save my default values (Null in my case) of each record.

Is there a way to have the serialization and ignore those empty values and populate them with the default values from the record on the de-serializations.

I tried to overwrite the handlers on my own, but if i'm not mistaken - i cannot overwrite handlers for record since its already have a handler of it's own.

So, is there a way to do so? To save only the fields that have actual values different then the defaults? It will reduce about 70% of my storage data.

Thanks

@glenjamin
Copy link
Owner

I'm not sure if there's a general way to do this. I'd be open to accepting a PR which added this functionality to the core lib, but off-by-default.

@tomershohet
Copy link
Author

Great, thanks @glenjamin

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