mirror of
https://github.com/open-goal/jak-project
synced 2026-06-13 14:07:02 -04:00
Update json.hpp
Fix broken changes I made earlier
This commit is contained in:
Vendored
+17
-17
@@ -70,7 +70,7 @@ SOFTWARE.
|
||||
|
||||
|
||||
#include <exception> // exception
|
||||
#include <stdexcept> // exception
|
||||
#include <stdexcept> // runtime_error
|
||||
#include <string> // to_string
|
||||
|
||||
// #include <nlohmann/detail/input/position_t.hpp>
|
||||
@@ -92,7 +92,7 @@ struct position_t
|
||||
/// the number of lines read
|
||||
std::size_t lines_read = 0;
|
||||
|
||||
/// conversion to size_t to preserve SAX interfaces
|
||||
/// conversion to size_t to preserve SAX interface
|
||||
constexpr operator size_t() const
|
||||
{
|
||||
return chars_read_total;
|
||||
@@ -2324,7 +2324,7 @@ namespace detail
|
||||
/*!
|
||||
@brief general exception of the @ref basic_json class
|
||||
|
||||
This class is an extension of `std::runtime_error` objects with a member @a id for
|
||||
This class is an extension of `std::exception` objects with a member @a id for
|
||||
exception ids. It is used as the base class for all exceptions thrown by the
|
||||
@ref basic_json class. This class can hence be used as "wildcard" to catch
|
||||
exceptions.
|
||||
@@ -2349,7 +2349,7 @@ caught.,exception}
|
||||
|
||||
@since version 3.0.0
|
||||
*/
|
||||
class exception : public std::runtime_error
|
||||
class exception : public std::exception
|
||||
{
|
||||
public:
|
||||
/// returns the explanatory string
|
||||
@@ -4823,7 +4823,7 @@ class input_stream_adapter
|
||||
std::char_traits<char>::int_type get_character()
|
||||
{
|
||||
auto res = sb->sbumpc();
|
||||
// set eof manually, as we don't use the istream interfaces.
|
||||
// set eof manually, as we don't use the istream interface.
|
||||
if (JSON_HEDLEY_UNLIKELY(res == EOF))
|
||||
{
|
||||
is->clear(is->rdstate() | std::ios::eofbit);
|
||||
@@ -5191,9 +5191,9 @@ namespace nlohmann
|
||||
{
|
||||
|
||||
/*!
|
||||
@brief SAX interfaces
|
||||
@brief SAX interface
|
||||
|
||||
This class describes the SAX interfaces used by @ref nlohmann::json::sax_parse.
|
||||
This class describes the SAX interface used by @ref nlohmann::json::sax_parse.
|
||||
Each function is called in different situations while the input is parsed. The
|
||||
boolean return value informs the parser whether to continue processing the
|
||||
input.
|
||||
@@ -5314,7 +5314,7 @@ namespace detail
|
||||
/*!
|
||||
@brief SAX implementation to create a JSON value from SAX events
|
||||
|
||||
This class implements the @ref json_sax interfaces and processes the SAX events
|
||||
This class implements the @ref json_sax interface and processes the SAX events
|
||||
to create a JSON value which makes it basically a DOM parser. The structure or
|
||||
hierarchy of the JSON value is managed by the stack `ref_stack` which contains
|
||||
a pointer to the respective array or object for each recursion depth.
|
||||
@@ -7198,7 +7198,7 @@ scan_number_done:
|
||||
/*
|
||||
@brief get next character from the input
|
||||
|
||||
This function provides the interfaces to the used input adapter. It does
|
||||
This function provides the interface to the used input adapter. It does
|
||||
not throw in case the input reached EOF, but returns a
|
||||
`std::char_traits<char>::eof()` in that case. Stores the scanned characters
|
||||
for use in error messages.
|
||||
@@ -9881,7 +9881,7 @@ class binary_reader
|
||||
/*!
|
||||
@brief get next character from the input
|
||||
|
||||
This function provides the interfaces to the used input adapter. It does
|
||||
This function provides the interface to the used input adapter. It does
|
||||
not throw in case the input reached EOF, but returns a -'ve valued
|
||||
`std::char_traits<char_type>::eof()` in that case.
|
||||
|
||||
@@ -10184,7 +10184,7 @@ class parser
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief public parser interfaces
|
||||
@brief public parser interface
|
||||
|
||||
@param[in] strict whether to expect the last token to be EOF
|
||||
@param[in,out] result parsed JSON value
|
||||
@@ -10249,7 +10249,7 @@ class parser
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief public accept interfaces
|
||||
@brief public accept interface
|
||||
|
||||
@param[in] strict whether to expect the last token to be EOF
|
||||
@return whether the input is a proper JSON text
|
||||
@@ -12628,7 +12628,7 @@ namespace nlohmann
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
/// abstract output adapter interfaces
|
||||
/// abstract output adapter interface
|
||||
template<typename CharType> struct output_adapter_protocol
|
||||
{
|
||||
virtual void write_character(CharType c) = 0;
|
||||
@@ -16724,7 +16724,7 @@ class basic_json
|
||||
using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>;
|
||||
|
||||
using input_format_t = detail::input_format_t;
|
||||
/// SAX interfaces type, see @ref nlohmann::json_sax
|
||||
/// SAX interface type, see @ref nlohmann::json_sax
|
||||
using json_sax_t = json_sax<basic_json>;
|
||||
|
||||
////////////////
|
||||
@@ -21253,7 +21253,7 @@ class basic_json
|
||||
element as string (see example).
|
||||
|
||||
@param[in] ref reference to a JSON value
|
||||
@return iteration proxy object wrapping @a ref with an interfaces to use in
|
||||
@return iteration proxy object wrapping @a ref with an interface to use in
|
||||
range-based for loops
|
||||
|
||||
@liveexample{The following code shows how the wrapper is used,iterator_wrapper}
|
||||
@@ -21341,7 +21341,7 @@ class basic_json
|
||||
<https://github.com/nlohmann/json/issues/2040> for more
|
||||
information.
|
||||
|
||||
@return iteration proxy object wrapping @a ref with an interfaces to use in
|
||||
@return iteration proxy object wrapping @a ref with an interface to use in
|
||||
range-based for loops
|
||||
|
||||
@liveexample{The following code shows how the function is used.,items}
|
||||
@@ -23249,7 +23249,7 @@ class basic_json
|
||||
/*!
|
||||
@brief generate SAX events
|
||||
|
||||
The SAX event lister must follow the interfaces of @ref json_sax.
|
||||
The SAX event lister must follow the interface of @ref json_sax.
|
||||
|
||||
This function reads from a compatible input. Examples are:
|
||||
- an std::istream object
|
||||
|
||||
Reference in New Issue
Block a user