![]() |
TerraForge3D
2.3.1
3D Terrain And Landscape Generator
|
using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::array_t = ArrayType<basic_json, AllocatorType<basic_json> > |
a type for an array
RFC 8259 describes JSON arrays as follows:
An array is an ordered sequence of zero or more values.
To store objects in C++, a type is defined by the template parameters explained below.
ArrayType | container type to store arrays (e.g., std::vector or std::list ) |
AllocatorType | allocator to use for arrays (e.g., std::allocator ) |
With the default values for ArrayType (std::vector
) and AllocatorType (std::allocator
), the default value for array_t is:
RFC 8259 specifies:
An implementation may set limits on the maximum depth of nesting.
In this class, the array's limit of nesting is not explicitly constrained. However, a maximum depth of nesting may be introduced by the compiler or runtime environment. A theoretical limit can be queried by calling the max_size function of a JSON array.
Arrays are stored as pointers in a basic_json type. That is, for any access to array values, a pointer of type array_t*
must be dereferenced.