xentara-utils v2.0.4
The Xentara Utility Library
|
An accessor used for reading a JSON string progressively. More...
#include <xentara/utils/json/decoder/String.hpp>
Classes | |
class | Iterator |
An iterator that can be used to iterator over a string as UTF-8 code units. More... | |
Public Member Functions | |
String ()=delete | |
This type is not user-constructible. | |
template<typename Char , typename CharTraits , typename Allocator > | |
internal | operator std::basic_string< Char, CharTraits, Allocator > () |
Reads the entire string. | |
template<tools::StringType StdString> | |
auto | read (const typename StdString::allocator_type &allocator=typename StdString::allocator_type()) -> StdString |
Reads the entire string. | |
auto | begin () -> Iterator |
Returns an object that can be used to iterate over the string data. | |
constexpr auto | end () noexcept -> std::default_sentinel_t |
Returns an sentinel that can be used to determine if an iterator is exhausted. | |
template<typename Char , typename CharTraits , typename Allocator > | |
operator std::basic_string< Char, CharTraits, Allocator > () | |
An accessor used for reading a JSON string progressively.
Objects of this class can be moved, but not copied.
|
delete |
This type is not user-constructible.
auto xentara::utils::json::decoder::String::begin | ( | ) | -> Iterator |
Returns an object that can be used to iterate over the string data.
std::runtime_error | An error occured reading the first code unit from the stream |
|
constexprnoexcept |
Returns an sentinel that can be used to determine if an iterator is exhausted.
internal xentara::utils::json::decoder::String::operator std::basic_string< Char, CharTraits, Allocator > | ( | ) |
Reads the entire string.
SyntaxError | The stream does not contain a valid JSON string |
std::runtime_error | An error occured reading from the stream |
xentara::utils::json::decoder::String::operator std::basic_string< Char, CharTraits, Allocator > | ( | ) |
auto xentara::utils::json::decoder::String::read | ( | const typename StdString::allocator_type & | allocator = typename StdString::allocator_type() | ) | -> StdString |
Reads the entire string.
SyntaxError | The stream does not contain a valid JSON string |
std::runtime_error | An error occured reading from the stream |
allocator | The allocator for the returned string |