tuple_category
Conversion category for tuples.
Synopsis
Defined in header <boost/json/conversion.hpp>.
struct tuple_category;
Description
Tuples are represented in JSON as arrays.
By default a type T
is considered a tuple if std::tuple_size<T>::value
is a positive number.
Users can specialize conversion_category_for
for their own types if they want them to be treated like tuples. For example:
namespace boost {
namespace json {
template <>
struct conversion_category_for<your::tuple>
{
using type = tuple_category;
};
} // namespace boost
} // namespace json
Matching Types
Convenience header <boost/json.hpp>.