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;
51 std::optional<std::size_t> _character;
65 using size_type = value::size_type;
110 encoding string_encoding()
const {
return _string_encoding; }
151 encoding _string_encoding = encoding::utf8;
152 std::optional<size_type> _max_struct_depth = std::nullopt;
153 bool _require_document =
false;
154 bool _complete_parse =
true;
155 bool _comments =
true;
176value parse(std::string_view input,
177 const parse_options& parse_options,
178 const extract_options& extract_options
182JSONV_PUBLIC value parse(std::string_view input,
const parse_options& parse_options);
183JSONV_PUBLIC value parse(std::string_view input,
const extract_options& extract_options);
206value parse(std::istream& input,
207 const parse_options& parse_options,
208 const extract_options& extract_options
212JSONV_PUBLIC value parse(std::istream& input,
const parse_options& parse_options);
213JSONV_PUBLIC value parse(std::istream& input,
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_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.