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, class BinaryType = std::vector<std::uint8_t>>
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json |
( |
std::nullptr_t |
= nullptr | ) |
|
|
inlinenoexcept |
create a null object
Create a null
JSON value. It either takes a null pointer as parameter (explicitly creating null
) or no parameter (implicitly creating null
). The passed null pointer itself is not read – it is only used to choose the right constructor.
@complexity Constant.
@exceptionsafety No-throw guarantee: this constructor never throws exceptions.
@liveexample{The following code shows the constructor with and without a null pointer parameter.,basic_json__nullptr_t}
- Since
- version 1.0.0
Definition at line 19188 of file json.hpp.
19190 {
19192 }
basic_json(const value_t v)
create an empty value with a given type
void assert_invariant(bool check_parents=true) const noexcept
checks the class invariants