8 #ifndef INCLUDED_ORCUS_JSON_DOCUMENT_TREE_HPP
9 #define INCLUDED_ORCUS_JSON_DOCUMENT_TREE_HPP
12 #include "exception.hpp"
25 struct document_resource;
50 enum class node_t : uint8_t
81 namespace detail {
namespace init {
class node; }}
91 std::unique_ptr<impl> mp_impl;
126 std::unique_ptr<impl> mp_impl;
158 std::vector<std::string_view>
keys()
const;
174 std::string_view
key(
size_t index)
const;
289 node operator[](std::string_view key);
357 std::vector<detail::init::node> m_vs;
362 array(std::initializer_list<detail::init::node> vs);
374 object(
const object&) =
delete;
379 namespace detail {
namespace init {
388 friend class ::orcus::json::document_tree;
389 friend class ::orcus::json::node;
392 std::unique_ptr<impl> mp_impl;
398 node(std::nullptr_t);
400 node(
const std::string& s);
401 node(std::initializer_list<detail::init::node> vs);
409 node& operator= (
node other) =
delete;
413 json_value* to_json_value(document_resource& res)
const;
414 void store_to_node(document_resource& res, json_value* parent)
const;
428 std::unique_ptr<impl> mp_impl;
430 const document_resource& get_resource()
const;
442 document_tree& operator= (std::initializer_list<detail::init::node> vs);
Definition: exception.hpp:19
Definition: json_document_tree.hpp:353
Definition: json_document_tree.hpp:87
Definition: json_document_tree.hpp:120
bool has_key(std::string_view key) const
std::vector< std::string_view > keys() const
std::string_view key(size_t index) const
const_node child(size_t index) const
std::string_view string_value() const
double numeric_value() const
size_t child_count() const
uintptr_t identity() const
const_node parent() const
const_node child(std::string_view key) const
Definition: json_document_tree.hpp:387
Definition: json_document_tree.hpp:32
Definition: json_document_tree.hpp:423
json::node get_document_root()
std::string dump_yaml() const
void swap(document_tree &other)
json::const_node get_document_root() const
void load(std::string_view stream, const json_config &config)
std::string dump_xml() const
Definition: json_document_tree.hpp:44
Definition: json_document_tree.hpp:274
void push_back(const detail::init::node &v)
node child(std::string_view key)
Definition: json_document_tree.hpp:371
Definition: config.hpp:20
Definition: config.hpp:60