JSON for Modern C++
3.5.0
|
◆ string_t
template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer>
RFC 7159 describes JSON strings as follows:
To store objects in C++, a type is defined by the template parameter described below. Unicode values are split by the JSON class into byte-sized characters during deserialization.
Default typeWith the default values for StringType ( std::string EncodingStrings are stored in UTF-8 encoding. Therefore, functions like String comparisonRFC 7159 states:
This implementation is interoperable as it does compare strings code unit by code unit. StorageString values are stored as pointers in a basic_json type. That is, for any access to string values, a pointer of type
|