string_category

Conversion category for strings.

Synopsis

Defined in header <boost/json/conversion.hpp>.

using string_category = std::integral_constant< conversion_category, conversion_category::string >;

Description

String types are represented as JSON strings.

By default a type is considered a string if it is convertible to string_view.

Users can specialize the trait for their own types if they want them to be treated like strings. For example:

namespace boost { namespace json {

template <>
struct is_string_like<your::string> : string_category
{ };

} }

Matching Types

Convenience header <boost/json.hpp>.