deserialize from a pair of character iterators (or an iterator+sentinel pair, C++20 ranges support)

Synopsis

Declared in <nlohmann/json.hpp>

template<
    typename IteratorType,
    typename SentinelType = IteratorType>
requires detail::can_compare_ne<IteratorType, SentinelType>::value
[[nodiscard]]
static
basic_json<>
parse(
    IteratorType first,
    SentinelType last,
    parser_callback_t cb = nullptr,
    bool const allow_exceptions = true,
    bool const ignore_comments = false,
    bool const ignore_trailing_commas = false);

Return Value

a class to store JSON values

Note

The return value should not be discarded.

Parameters

Name

Description

cb

per‐element parser callback type

Created with MrDocs