7#if !defined(TETENGO_JSON_ELEMENT_HPP)
8#define TETENGO_JSON_ELEMENT_HPP
11#include <unordered_map>
72 std::unordered_map<std::string, std::string>
attributes,
90 [[nodiscard]]
const std::string&
value()
const;
97 [[nodiscard]]
const std::unordered_map<std::string, std::string>&
attributes()
const;
114 std::unordered_map<std::string, std::string> m_attributes;
An element.
Definition element.hpp:22
type_category_type
The type category type.
Definition element.hpp:40
@ structure_close
A closing structure.
@ structure_open
An opening structure.
const std::unordered_map< std::string, std::string > & attributes() const
Returns the attributes.
const file_location & get_file_location() const
Returns the file location.
type_name_type
The type name type.
Definition element.hpp:28
@ boolean
A boolean. primitive.
@ object
An object. structure.
@ member
A member. structure.
@ number
A number. primitive.
@ string
A string. primitive.
@ array
An array. structure.
const type_type & type() const
Returns the type.
const std::string & value() const
Returns the value.
element(type_type type, std::string value, std::unordered_map< std::string, std::string > attributes, file_location file_location_)
Creates an element.
A file location.
Definition file_location.hpp:22
The type type.
Definition element.hpp:48
type_name_type name
A name.
Definition element.hpp:50
type_category_type category
A category.
Definition element.hpp:53