Is there an equivalent method to objectHash in v1
Describe the feature
In v1, ojbectHash returns value like this: object:1:string:3:foo:string:3:bar, but in v2, serialize returns value like this: {foo:'bar'}
How can I generate return value in the form of version v1?
Additional information
- [ ] Would you be willing to help implement this feature?
We have reworked the serializer to rewrite it into a safer, more compact and faster format. Any reason you need the old format? (and in this case why not using v1?)
We have reworked the serializer to rewrite it into a safer, more compact and faster format. Any reason you need the old format? (and in this case why not using v1?)
In my old project, I used objectHash to generate a unique value and stored it in the database. When I tried to upgrade ohash, I found that v1 and v2 are incompatible, so I couldn't do the upgrade.
If v1 and v2 are incompatible, maybe we should highlight this change in the documentation. Currently, the documentation says that it is a renaming from objectHash to serialize.
Sure feel free to make PR upsating docs!
I would suggest to use a format prefix when storing in db like v2:[hash] you can also save lots of space by upgrading new records!