MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / validation_example

Function validation_example

examples/src/examples.cpp:214–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void 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
237void get_example()
238{

Callers 1

mainFunction · 0.85

Calls 4

readMethod · 0.45
messageMethod · 0.45
lineMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected