using json_base_class_t = detail::json_base_class<CustomBaseClass>;The base class used to inject custom functionality into each instance of basic_json.
Examples of such functionality might be metadata, additional member functions (e.g., visitors), or other application-specific code.
CustomBaseClass
: the base class to be added to basic_json
The default value for CustomBaseClass is void. In this case an
empty base class is used and no additional functionality is injected.
The type CustomBaseClass has to be a default-constructible class.
basic_json only supports copy/move construction/assignment if CustomBaseClass does so as well.
??? example
The following code shows how to inject custom data and methods for each node.
```cpp
--8<-- "examples/json_base_class_t.cpp"
```
Output:
```json
--8<-- "examples/json_base_class_t.output"
```
- Added in version 3.12.0.