| 87 | } |
| 88 | |
| 89 | int main() { |
| 90 | MessageMap messages; |
| 91 | |
| 92 | const char* json1 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\" }"; |
| 93 | cout << json1 << endl; |
| 94 | ParseMessages(json1, messages); |
| 95 | |
| 96 | for (MessageMap::const_iterator itr = messages.begin(); itr != messages.end(); ++itr) |
| 97 | cout << itr->first << ": " << itr->second << endl; |
| 98 | |
| 99 | cout << endl << "Parse a JSON with invalid schema." << endl; |
| 100 | const char* json2 = "{ \"greeting\" : \"Hello!\", \"farewell\" : \"bye-bye!\", \"foo\" : {} }"; |
| 101 | cout << json2 << endl; |
| 102 | ParseMessages(json2, messages); |
| 103 | |
| 104 | return 0; |
| 105 | } |
nothing calls this directly
no test coverage detected