22#ifndef JSONV_PARSE_MAX_STRUCTURE_DEPTH
23# define JSONV_PARSE_MAX_STRUCTURE_DEPTH 128
36 public std::runtime_error
41 explicit parse_error(
const char* message, std::optional<std::size_t> character)
noexcept;
52 std::optional<std::size_t> _character;
66 using size_type = value::size_type;
114 encoding string_encoding()
const {
return _string_encoding; }
159 encoding _string_encoding = encoding::utf8;
160 std::optional<size_type> _max_struct_depth = std::nullopt;
161 bool _require_document =
false;
162 bool _complete_parse =
true;
163 bool _comments =
true;
184value parse(std::string_view input,
185 const parse_options& parse_options,
186 const extract_options& extract_options
214value parse(std::istream& input,
215 const parse_options& parse_options,
216 const extract_options& extract_options
An adapter for enumeration types.
An error encountered when parsing.
parse_error(const char *message, std::optional< std::size_t > character) noexcept
Configuration for various parsing options.
bool require_document() const
std::optional< size_type > max_structure_depth() const
parse_options()
Create an instance with the default options.
encoding
The encoding format for strings.
bool complete_parse() const
Represents a single JSON value, which can be any one of a potential kind, each behaving slightly diff...
Copyright (c) 2014-2020 by Travis Gockel.
#define JSONV_NODISCARD
Warn if the caller discards the result of this function.
#define JSONV_PUBLIC
This function or class is part of the public API for JSON Voorhees.
#define JSONV_PARSE_MAX_STRUCTURE_DEPTH
See jsonv::parse_options::k::max_structure_depth.
Copyright (c) 2012-2020 by Travis Gockel.