I know there are JSON parsers but this seems so simple so I could do a diy approach.
std::string item_name
std::string item_address
itemname = "John";
item_address = "New York";
{"item": {"name": "std::cout << item_name", "address": "std::cout << item_address"}}
I want to have a rigid JSON template which I insert my values into. The approach above seems like it's wrong.
Should I use templates? Can anyone tell me how I might start implementing something like this please?
Aucun commentaire:
Enregistrer un commentaire