Describe the bug
Adding Values after call to clear() fails.
To Reproduce
Steps to reproduce the behavior:
1.
bool result = false;
Json::Value root;
Json::Reader reader;
result = reader.parse(request, request + strlen(request), root, false);
if (result)
{
std::string command;
int advanced;
try
{
command = root[0]["command"].asString();
advanced = root[0]["advanced"].asInt();
//Done with command
root.clear();
if (command.compare("GetStationDesc") == 0)
{
// If we use the root above after clear() this addition fails.
// Json::Value root;
root["name"] = "S2000Test";
root["type"] = "S2000";
Expected behavior
After the root.clear() I should be able to add items.
Desktop (please complete the following information):
OS: Embedded RTX with Keil compiler.
Meson version
Ninja version
Additional context
Add any other context about the problem here.
Describe the bug Adding Values after call to clear() fails.
To Reproduce Steps to reproduce the behavior: 1. bool result = false;
Json::Value root; Json::Reader reader;
result = reader.parse(request, request + strlen(request), root, false); if (result) { std::string command; int advanced; try { command = root[0]["command"].asString(); advanced = root[0]["advanced"].asInt();
Expected behavior After the root.clear() I should be able to add items.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.