Skip to content

Commit

Permalink
Merge branch 'master' into wolfssl-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-chrismc authored Jul 29, 2024
2 parents 85e404d + b36e8a9 commit ef2112a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:

jobs:
gcc-4-8:
if: false # There's no existing image with node20 and gcc4.8 https://github.com/actions/checkout/issues/1809
name: GCC 4.8
runs-on: ubuntu-latest
container:
Expand Down
7 changes: 5 additions & 2 deletions include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ namespace jwt {
}

static bool parse(value_type& val, string_type str) {
Json::Reader reader;
return reader.parse(str, val);
Json::CharReaderBuilder builder;
const std::unique_ptr<Json::CharReader> reader(builder.newCharReader());

return reader->parse(reinterpret_cast<const char*>(str.c_str()),
reinterpret_cast<const char*>(str.c_str() + str.size()), &val, nullptr);
}

static string_type serialize(const value_type& val) {
Expand Down

0 comments on commit ef2112a

Please sign in to comment.