1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

📝 overworked documentation

This commit is contained in:
Niels Lohmann
2018-08-16 21:53:47 +02:00
parent 07494e06d7
commit b5c54b41fd
29 changed files with 18929 additions and 9 deletions

View File

@ -3788,6 +3788,11 @@ namespace nlohmann
/*!
@brief SAX interface
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.
*/
template<typename BasicJsonType>
struct json_sax
@ -3840,6 +3845,7 @@ struct json_sax
@brief a string was read
@param[in] val string value
@return whether parsing should proceed
@note It is safe to move the passed string.
*/
virtual bool string(string_t& val) = 0;
@ -3855,6 +3861,7 @@ struct json_sax
@brief an object key was read
@param[in] val object key
@return whether parsing should proceed
@note It is safe to move the passed string.
*/
virtual bool key(string_t& val) = 0;
@ -3922,7 +3929,7 @@ class json_sax_dom_parser
parsing
@param[in] allow_exceptions_ whether parse errors yield exceptions
*/
json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true)
explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true)
: root(r), allow_exceptions(allow_exceptions_)
{}
@ -11286,7 +11293,7 @@ class basic_json
public:
using value_t = detail::value_t;
/// @copydoc nlohmann::json_pointer
/// JSON Pointer, see @ref nlohmann::json_pointer
using json_pointer = ::nlohmann::json_pointer<basic_json>;
template<typename T, typename SFINAE>
using json_serializer = JSONSerializer<T, SFINAE>;
@ -11294,6 +11301,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 interface type, see @ref nlohmann::json_sax
using json_sax_t = json_sax<basic_json>;
////////////////