Closed kiner-shah closed 1 year ago
I am not sure what the issue is 🤔
0.6.0 matches the readme and master matches? The code in question is unreleased https://github.com/Thalhammer/jwt-cpp/commit/cba92ab173f45bb028f287b4acdbdb9d06352499 is that what might have tripped you up?
The releases are infrequent since it's very stable but I dont think it's an issue for master docs to match the master code. Thats very common.
@prince-chrismc Yes it seems I got confused because I downloaded the release artifacts but kept the repo's URL open in the browser which showed the master branch README which had a new API in the example.
I see you mentioned the exact commit (cba92ab) where this API was changed. I think it would be better to keep the older API but with some deprecation warning in the new release. Else, it can completely break some code that used the old API and now wants to migrate to a new version due to some reasons.
I think it would be better to keep the older API but with some deprecation warning in the new release.
I generally agree, but jwt-cpp had way more impactful API breaks in the past. In this case for most codebases it will boil down to replacing all occurrences of get_payload_claims
with get_payload_json
. We'd like to adopt semver eventually, but I'd like to make sure its actually usable before, so we don't end up with a version 200.1.1
.
We do try to avoid breaking the API, there are most often aliases left to avoid any impact. It's a hardline to balance improvements and not changing.
Ticked this as closed since the docs for that release were correct :)
What happened?
Tried to follow the example in Getting Started section of README with slight modifications. It threw a compiler error stating a method was not found which is weird.
I think the issue can be fixed by using
decoded_jwt::get_payload_claims()
function. The README code may need to be changed.I also noticed that this issue in README is there in the master branch. When I check README of v0.6.0 release artifacts, I see
get_payload_claims()
mentioned correctly there.How To Reproduce?
Run with:
g++ main.cpp -I /path/to/jwt-cpp-0.6.0/include/
Version
0.6.0
What OS are you seeing the problem on?
Linux
What compiler are you seeing the problem on?
GCC
Relevant log output