| 72 | }; |
| 73 | |
| 74 | bool |
| 75 | validate( 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 | |
| 88 | extern "C" |
| 89 | int |
no test coverage detected