File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ struct ResponseHandler
197
197
198
198
bool Key (const Ch* str, rapidjson::SizeType /* length*/ , bool /* copy*/ )
199
199
{
200
- _key = str;
200
+ _keyStack. push ( str) ;
201
201
return true ;
202
202
}
203
203
@@ -225,7 +225,8 @@ struct ResponseHandler
225
225
switch (_responseStack.top ().type ())
226
226
{
227
227
case Type::Map:
228
- _responseStack.top ().emplace_back (std::move (_key), std::move (value));
228
+ _responseStack.top ().emplace_back (std::move (_keyStack.top ()), std::move (value));
229
+ _keyStack.pop ();
229
230
break ;
230
231
231
232
case Type::List:
@@ -238,7 +239,7 @@ struct ResponseHandler
238
239
}
239
240
}
240
241
241
- std::string _key ;
242
+ std::stack<std:: string> _keyStack ;
242
243
std::stack<Value> _responseStack;
243
244
};
244
245
You can’t perform that action at this time.
0 commit comments