We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3376880 commit b36e8a9Copy full SHA for b36e8a9
include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h
@@ -117,8 +117,11 @@ namespace jwt {
117
}
118
119
static bool parse(value_type& val, string_type str) {
120
- Json::Reader reader;
121
- return reader.parse(str, val);
+ Json::CharReaderBuilder builder;
+ const std::unique_ptr<Json::CharReader> reader(builder.newCharReader());
122
+
123
+ return reader->parse(reinterpret_cast<const char*>(str.c_str()),
124
+ reinterpret_cast<const char*>(str.c_str() + str.size()), &val, nullptr);
125
126
127
static string_type serialize(const value_type& val) {
0 commit comments