Skip to content

Commit

Permalink
fix example to print array value
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-chrismc authored Nov 17, 2024
1 parent 4fe8d5f commit a99d41f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/traits/danielaparker-jsoncons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ int main() {
const auto decoded = jwt::decode<traits>(token);

const auto array = traits::as_array(decoded.get_payload_claim("object").to_json()["api"]["array"]);
std::cout << "payload /object/api/array = " << array << std::endl;
std::cout << "payload /object/api/array = " <<
jsoncons::pretty_print(traits::json(array)) << std::endl;

jwt::verify<traits>()
.allow_algorithm(jwt::algorithm::none{})
Expand Down

0 comments on commit a99d41f

Please sign in to comment.