JSON for Modern C++
3.0.1
|
◆ string_t
template<template< typename, typename, typename... > class ObjectType = std::map, template< typename, typename... > 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 > class AllocatorType = std::allocator, template< typename, typename=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
|