check if the input is valid JSON
Declared in <nlohmann/json.hpp>
[[nodiscard, deprecated]]
static
bool
accept(
/* implementation-defined */::span_input_adapter&& i,
bool const ignore_comments = false,
bool const ignore_trailing_commas = false);
Deprecated: Since 3.8.0; use accept(ptr, ptr + len). Use of this entity is allowed but discouraged.
| Name | Description |
|---|---|
| i | input to check |
| ignore_comments | whether comments should be ignored and treated like whitespace (true) or yield a parse error (false) |
| ignore_trailing_commas | whether trailing commas in arrays and objects should be ignored (true) or yield a parse error (false) |