The return value of the following functions indicates whether the JSON parsing is successful unless 'throwOnError' parameter is set to 'true'. In the latter case TJsonException is thrown in case of parsing errors. */
| 76 | In the latter case TJsonException is thrown in case of parsing errors. |
| 77 | */ |
| 78 | inline bool ValidateJson(IInputStream* in, const TJsonReaderConfig* config, bool throwOnError = false) { |
| 79 | TJsonCallbacks c(throwOnError); |
| 80 | return ReadJson(in, config, &c); |
| 81 | } |
| 82 | |
| 83 | inline bool ValidateJson(TStringBuf in, const TJsonReaderConfig& config = TJsonReaderConfig(), bool throwOnError = false) { |
| 84 | TMemoryInput min(in.data(), in.size()); |
no test coverage detected