-
Notifications
You must be signed in to change notification settings - Fork 6
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
Migrate Poison to Jason #2237
base: main
Are you sure you want to change the base?
Migrate Poison to Jason #2237
Conversation
Ah, that one was meant for @nthiad but she'll may be able to look at the issue you reached. |
Ohh Sorry!! I've been doing some peer programming with Caspian today and I chose from the board what seems doable to show him some code! Sorry @nthiad!! |
this appears to be why that line in particular doesn't work:
from https://github.com/michalmuskala/jason#differences-to-poison |
After some prodding, the access_token function receives an Ask.OAuthTokenServer object so there is no parsing that needs to happen because it has a member This makes the tests happy and I can still log in and out via the web interface: def access_token(token) do
OAuth2.AccessToken.new(token.access_token["access_token"])
end |
I applied the change proposed by @nthiad and it worked neatly :) Thanks! Despite that, I couldn't remove @ysbaddaden, I @ you to re-ask for your review :) |
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.
@leandroradusky That looks good to me, but I notice that oauth2
is already v0.7.0 in mix.exs
🤔
Exactly, in v0.7.0 Poison is only required as a test dependency it say.
I'm a little bit confused here... There's something I'm misinterpreting? |
Yeah, same here, I'll try. |
Close #2046.
Changed all references to
Poison
into references toJason
.@derive Jason.Encoder
has to be added since this needs to be explicit for Jason.Just one replacement is missing:
Don't know why but changing here
Poison.Decode.decode
toJason.decode
would break lots of tests, don't know if this has to do something with the external wiring of the project, or if this schema should have something similar to the@derive
statement mentioned above.Because of that,
Poison
was not removed from the mix file.Jason
version (1.0) was kept in the mix file, while there are newer versions available.