path_category
Conversion category for filesystem paths.
Synopsis
Defined in header <boost/json/conversion.hpp>.
using path_category = std::integral_constant< conversion_category, conversion_category::path >;
Description
Paths are represented in JSON as strings.
By default a type T is considered a path 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 -
std::iterator_traits<It>::value_typeisT; and -
T::value_typeis well-formed and denotes a type; and -
T::string_typeis well-formed, denotes a type, and is an alias forstd::basic_string< T::value_type >.
Users can specialize conversion_category_of for their own types if they don’t want them to be treated like filesystem paths. For example:
namespace boost { namespace json {
template <>
struct conversion_category_of<your::path> : path_category
{ };
} }
Matching Types
Convenience header <boost/json.hpp>.