sequence_category
Conversion category for sequences.
Synopsis
Defined in header <boost/json/conversion.hpp>.
using sequence_category = std::integral_constant< conversion_category, conversion_category::sequence >;
Description
Sequences are represented in JSON as arrays.
By default a type T is considered a sequence if
-
given
t, a glvalue of typeT; and -
given
It, the type denoted bydecltype(std::begin(t)),std::iterator_traits<It>::iterator_categoryis well-formed and denotes a type; and -
decltype(std::end(t))also denotes the typeIt; and -
std::iterator_traits<It>::value_typeis notT; and -
std::iterator_traits<It>::value_typeis notT.
Users can specialize conversion_category_of for their own types if they want them to be treated like sequences. For example:
namespace boost { namespace json {
template <>
struct conversion_category_of<your::container> : sequence_category
{ };
} }
Matching Types
Any SequenceContainer, array types.
Convenience header <boost/json.hpp>.