You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jiapengwen November 30, 2021
show you my code,:
using json = nlohmann::json;
namespacens {
voidto_json(json& j, const person& p) {
}
// here will create new object, but i just want to init my object(outside create) whit json valuevoidfrom_json(const json& j, person& p) {
}
} // namespace ns// in othre file
person my_person;
//here init my_person with json (j) valuefrom_json(j, my_person);
thank you your help
The text was updated successfully, but these errors were encountered:
I think you are misunderstood my question, i just want deserialization json to my already create object, but from_fson will create new object, this isn't my purpose
Discussed in #3168
Originally posted by jiapengwen November 30, 2021
show you my code,:
thank you your help
The text was updated successfully, but these errors were encountered: