-
Notifications
You must be signed in to change notification settings - Fork 146
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
Poison to Jason replacement & Postgrex update changes #144
Conversation
Jason requires you to manually derive the We need to ensure this is included in the CHANGELOG as a breaking change with a warning. |
@vasspilka are you still activly working on this, if not I can try to pick it up |
lib/event_store/json_serializer.ex
Outdated
|
||
case type do | ||
[] -> Jason.decode!(binary) | ||
type -> struct(type, Jason.decode!(binary, keys: :atoms)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be safer to use :atoms!
to only use existing atoms when loading data. To make sure all the atoms from the struct are always loaded, you could first make sure that the struct itself is loaded with something like struct(struct(type), Jason.decode!(binary, keys: :atoms!))
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the additional struct
call is already there. So only the :atoms
to :atoms!
change would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it
@danhawkins Hey, I am having trouble figuring out how to make the tests pass. If you manage to figure out why they don't we can fix and merge this. |
I am not "actively" working on it, but I can try to have a look again these days. Also you started using eventstore on Quiqup? |
50dd92b
to
a95a631
Compare
No description provided.