MCPcopy Create free account
hub / github.com/boostorg/json / validate

Function validate

test/basic_parser.cpp:136–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134namespace {
135
136bool
137validate( string_view s )
138{
139 // Parse with the null parser and return false on error
140 null_parser p;
141 system::error_code ec;
142 p.write( s.data(), s.size(), ec );
143 if( ec )
144 return false;
145
146 // The string is valid JSON.
147 return true;
148}
149
150parse_options
151make_options(

Callers 2

testIssue13Function · 0.70
testIssue20Function · 0.70

Calls 3

writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected