You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
433 B
27 lines
433 B
|
|
#include <iostream>
|
|
#include "json.h"
|
|
|
|
using namespace std;
|
|
|
|
int main(int argc, char **argv) {
|
|
string input;
|
|
string json_line;
|
|
JSONParse json;
|
|
list<JSONElement> l;
|
|
list<JSONElement>::iterator iter;
|
|
|
|
for (json_line = "", input = ""; getline(cin, input);)
|
|
json_line += input;
|
|
|
|
json.Set(json_line);
|
|
l = json.GetElements();
|
|
|
|
for (iter = l.begin(); iter != l.end(); iter++) {
|
|
cout << iter->name << endl;
|
|
}
|
|
|
|
return 0;
|
|
};
|
|
|