string_category
Conversion category for strings.
Synopsis
Defined in header <boost/json/conversion.hpp>.
struct string_category;
Description
By default a type is considered a string if it is convertible to string_view
.
Users can specialize conversion_category_for
for their own types if they want them to be treated as strings. For example:
namespace boost {
namespace json {
template <>
struct conversion_category_for<your::string>
{
using type = string_category;
};
} // namespace boost
} // namespace json
Matching Types
Convenience header <boost/json.hpp>.