-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Ensure array_type has front() method #361
base: master
Are you sure you want to change the base?
Ensure array_type has front() method #361
Conversation
Replace the `front()` with `[0]` as front is not supported by jsoncpp on array types. Signed-off-by: Omar Mohamed <[email protected]>
Would it be possible to implement the missing function in the trait definition? Extending,
Also it seems we are missing this function as a requirement for the json array Line 2459 in 83703d7
|
This reverts commit dfa7d29.
Signed-off-by: Omar Mohamed <[email protected]>
Is |
Yes, Might also be worth checking if the unit tests are missing a case 🤔 we just dint run the unit tests with JSON libraries jwt-cpp/.github/workflows/traits.yml Line 59 in 83703d7
Notes: jwt-cpp/example/jwks-verify.cpp Line 111 in 83703d7
Line 117 in 83703d7
|
Signed-off-by: Omar Mohamed <[email protected]>
I added this line
|
Signed-off-by: Omar Mohamed <[email protected]>
Signed-off-by: Omar Mohamed <[email protected]>
Signed-off-by: Omar Mohamed <[email protected]>
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.
Amazing work, thanks for helping to fix this!
Looks like a type error in the Danieljson changes from the CI |
Something is wrong in the current implementation. static object_type as_object(const json& val) {
if (val.type() != jsoncons::json_type::object_value) throw std::bad_cast();
return object_type(val.object_value());
}
static array_type as_array(const json& val) {
if (val.type() != jsoncons::json_type::array_value) throw std::bad_cast();
return val.array_value();
} These two functions use |
The problem existed before the current modifications. |
Replace
front()
with[0]
inget_x5c_key_value
as front is not supported by jsoncpp on array types.