I have a little doubt about a json module in c ++, I was wondering if there is any way to get a json that already exists and increment more fields using c ++,
json data = json::parse(getData());
FILE * pFile;
pFile = fopen("data.json", "a");
fputs("", pFile);
fclose(pFile);
{
"0": {
"area": "SI",
"codigo_curso": "01",
"cpf": "000.000.000-00",
"data_nascimento": "00/00/0000",
"descricao": "Breve",
"endereco": "00000-000",
"nome": "Daniel Yohan"
}
}
I wanted to add more of these here with changed values:
"0": {
"area": "SI",
"codigo_curso": "01",
"cpf": "000.000.000-00",
"data_nascimento": "00/00/0000",
"descricao": "Breve",
"endereco": "00000-000",
"nome": "Daniel Yohan"
}
I'm using the link
Would anyone know how to load my current json then add and save again? I'll be grateful, this is for a college job. Thanks