-
Notifications
You must be signed in to change notification settings - Fork 101
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
serialize() vs json_encode() #82
Comments
thx. here are some benchmarks that can help on this topic https://niden.net/post/fast-serialization-of-data-in-php/ |
It does seem to be a lot faster! |
BTW I am not sure if with JSON there might be a risk that the decoded data does not match the encoded data, ie. array vs. objects and null handling. so I think likely if at all, we want to make this an option |
FYI still haven't had time to work on this .. but I just had another use case pop up for JSON: |
Nice! That use case makes a lot of sense. |
just wanted to know if there is a particular benefit that made you prefer serialize() over json_encode() ? I am currently looking into doing some analytics and machine learning over the versions and it would be convenient to be able to use JSON RDBMS functions to examine the data etc.
in this spirit would you be open to a PR that makes it optional if the encoding is done with serialize() or json_encode() ?
The text was updated successfully, but these errors were encountered: