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

Function validate

fuzzing/fuzz_basic_parser.cpp:74–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72};
73
74bool
75validate( string_view s )
76{
77 // Parse with the null parser and return false on error
78 null_parser p;
79 boost::system::error_code ec;
80 p.write( s.data(), s.size(), ec );
81 if( ec )
82 return false;
83
84 // The string is valid JSON.
85 return true;
86}
87
88extern "C"
89int

Callers 1

LLVMFuzzerTestOneInputFunction · 0.70

Calls 3

writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected