- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
Latest commit
32 lines (22 loc) · 645 Bytes
/
Copy pathtest.cpp
File metadata and controls
32 lines (22 loc) · 645 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include<iostream>
#include<vector>
#include"JSONR.h"
usingnamespacestd;
intmain(int argc, char** argv)
{
JSONRjson("def2JSON");
string nomi[3] = {"giovanni","antonio","michele"};
string numeri[3] ={"1","2","3"};
cout<<"test JSON"<<endl;
json.addString("hello","hello world");
json.addInteger("numero","2");
json.addBool("active","false");
json.addBool("active3","true");
json.addBool("active2","banana");
json.addArray("persone",nomi,3);
json.addArray("numeri",numeri,3);
json.addObject("obj",nomi,numeri,3,3);
json.compileJSON();
json.closeJSON();
return0;
}