Cant modify existing numbers inside a json object #557
Labels
kind: question
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Say for example I have something like
I can not do something like
j["num"] += 1;
as it gives me this error on runtime:
I tried simplifying it to
j["num"] = j["num"] + 1;
but that gives me this error at compile time:
error: no match for 'operator+' (operand types are 'nlohmann::basic_json<>::value_type {aka nlohmann::basic_json<>}' and 'int')|
The text was updated successfully, but these errors were encountered: