No-throw guarantee.
*/
~stream_parser() = default;
-
+
/** Constructor.
This constructs a new parser which first uses
@param ec Set to the error, if any occurred.
*/
+/** @{ */
BOOST_JSON_DECL
std::size_t
write_some(
std::size_t size,
error_code& ec);
+ BOOST_JSON_DECL
+ std::size_t
+ write_some(
+ char const* data,
+ std::size_t size,
+ std::error_code& ec);
+/** @} */
+
/** Parse a buffer containing all or part of a complete JSON.
This function parses JSON contained in the
@param ec Set to the error, if any occurred.
*/
+/** @{ */
std::size_t
write_some(
string_view s,
s.data(), s.size(), ec);
}
+ std::size_t
+ write_some(
+ string_view s,
+ std::error_code& ec)
+ {
+ return write_some(
+ s.data(), s.size(), ec);
+ }
+/** @} */
+
/** Parse a buffer containing all or part of a complete JSON.
This function parses JSON contained in the
@param ec Set to the error, if any occurred.
*/
+/** @{ */
BOOST_JSON_DECL
std::size_t
write(
std::size_t size,
error_code& ec);
+ BOOST_JSON_DECL
+ std::size_t
+ write(
+ char const* data,
+ std::size_t size,
+ std::error_code& ec);
+/** @} */
+
/** Parse a buffer containing all or part of a complete JSON.
This function parses a all or part of a JSON
@param ec Set to the error, if any occurred.
*/
+/** @{ */
std::size_t
write(
string_view s,
s.data(), s.size(), ec);
}
+ std::size_t
+ write(
+ string_view s,
+ std::error_code& ec)
+ {
+ return write(
+ s.data(), s.size(), ec);
+ }
+/** @} */
+
/** Parse a buffer containing all or part of a complete JSON.
This function parses a all or part of a JSON
@param ec Set to the error, if any occurred.
*/
+/** @{ */
BOOST_JSON_DECL
void
finish(error_code& ec);
+ BOOST_JSON_DECL
+ void
+ finish(std::error_code& ec);
+/** @} */
+
/** Indicate the end of JSON input.
This function is used to indicate that there