| 212 | } |
| 213 | |
| 214 | void validation_example() |
| 215 | { |
| 216 | std::string s = R"( |
| 217 | { |
| 218 | "StartDate" : "2017-03-01", |
| 219 | "MaturityDate" "2020-12-30" |
| 220 | } |
| 221 | )"; |
| 222 | std::stringstream is(s); |
| 223 | |
| 224 | json_stream_reader reader(is); |
| 225 | |
| 226 | std::error_code ec; |
| 227 | reader.read(ec); |
| 228 | if (ec) |
| 229 | { |
| 230 | std::cout << ec.message() |
| 231 | << " on line " << reader.line() |
| 232 | << " and column " << reader.column() |
| 233 | << '\n'; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | void get_example() |
| 238 | { |