danielaparker::jsoncons traits fail with version >=1.5.0 of jsoncons

Open Beginner friendly
#427 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cpp

Research direction

Start in include/jwt-cpp/traits/danielaparker-jsoncons/traits.h, focusing on the jsoncons::json_type names shown in the compiler errors. Compare them with the referenced jsoncons upstream commit, then verify that the traits compile with jsoncons 1.5.0 or newer on GCC/Linux.

Written by the indexing model from the issue text.

Description

bug
What happened?

Upstream has deprecated the type names int64_value etc. in 1.5.0, they are now just int64, leading to errors such as:

/var/tmp/portage/dev-cpp/jwt-cpp-0.7.2/work/jwt-cpp-0.7.2/include/jwt-cpp/traits/danielaparker-jsoncons/traits.h:125:72: error: ‘bool_value’ is not a member of ‘jsoncons::json_type’
  125 |                                 if (val.type() == jsoncons::json_type::bool_value) return type::boolean;
      |                                                                        ^~~~~~~~~~
/var/tmp/portage/dev-cpp/jwt-cpp-0.7.2/work/jwt-cpp-0.7.2/include/jwt-cpp/traits/danielaparker-jsoncons/traits.h:126:72: error: ‘int64_value’ is not a member of ‘jsoncons::json_type’
  126 |                                 if (val.type() == jsoncons::json_type::int64_value) return type::integer;
      |                                                                        ^~~~~~~~~~~

Relevant upstream commit:
https://github.com/danielaparker/jsoncons/commit/f070f9566a897fbdc7603553d960cf1907cdd72d

How To Reproduce?

Use jsoncons >= 1.5.0.

Version

0.7.2

What OS are you seeing the problem on?

Linux

What compiler are you seeing the problem on?

GCC

Relevant log output
/var/tmp/portage/dev-cpp/jwt-cpp-0.7.2/work/jwt-cpp-0.7.2/include/jwt-cpp/traits/danielaparker-jsoncons/traits.h:125:72: error: ‘bool_value’ is not a member of ‘jsoncons::json_type’
  125 |                                 if (val.type() == jsoncons::json_type::bool_value) return type::boolean;
      |                                                                        ^~~~~~~~~~
/var/tmp/portage/dev-cpp/jwt-cpp-0.7.2/work/jwt-cpp-0.7.2/include/jwt-cpp/traits/danielaparker-jsoncons/traits.h:126:72: error: ‘int64_value’ is not a member of ‘jsoncons::json_type’
  126 |                                 if (val.type() == jsoncons::json_type::int64_value) return type::integer;
      |                                                                        ^~~~~~~~~~~
Code of Conduct
  • I agree to follow this project's Code of Conduct
Dominant language
C++
Stars
1.2k
Forks
311
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Thalhammer/jwt-cpp

All issues in Thalhammer/jwt-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.