Project
Loading...
Searching...
No Matches
json.h File Reference
#include <algorithm>
#include <cassert>
#include <ciso646>
#include <cstddef>
#include <functional>
#include <initializer_list>
#include <iosfwd>
#include <iterator>
#include <numeric>
#include <string>
#include <utility>
#include <cstdint>
#include <map>
#include <memory>
#include <vector>
#include <limits>
#include <type_traits>
#include <exception>
#include <stdexcept>
#include <array>
#include <forward_list>
#include <tuple>
#include <valarray>
#include <cstring>
#include <ios>
#include <istream>
#include <clocale>
#include <cstdlib>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <ostream>
#include <cstdio>

Go to the source code of this file.

Classes

struct  nlohmann::detail::is_basic_json< typename >
 
struct  nlohmann::detail::is_basic_json< NLOHMANN_BASIC_JSON_TPL >
 
struct  nlohmann::detail::index_sequence< Ints >
 
struct  nlohmann::detail::merge_and_renumber< index_sequence< I1... >, index_sequence< I2... > >
 
struct  nlohmann::detail::make_index_sequence< N >
 
struct  nlohmann::detail::make_index_sequence< 0 >
 
struct  nlohmann::detail::make_index_sequence< 1 >
 
struct  nlohmann::detail::conjunction<... >
 
struct  nlohmann::detail::conjunction< B1 >
 
struct  nlohmann::detail::conjunction< B1, Bn... >
 
struct  nlohmann::detail::negation< B >
 
struct  nlohmann::detail::priority_tag< N >
 
struct  nlohmann::detail::priority_tag< 0 >
 
struct  nlohmann::detail::is_complete_type< T, typename >
 
struct  nlohmann::detail::is_complete_type< T, decltype(void(sizeof(T)))>
 
struct  nlohmann::detail::is_compatible_object_type_impl< B, RealType, CompatibleObjectType >
 
struct  nlohmann::detail::is_compatible_object_type_impl< true, RealType, CompatibleObjectType >
 
struct  nlohmann::detail::is_compatible_object_type< BasicJsonType, CompatibleObjectType >
 
struct  nlohmann::detail::is_basic_json_nested_type< BasicJsonType, T >
 
struct  nlohmann::detail::is_compatible_array_type< BasicJsonType, CompatibleArrayType >
 
struct  nlohmann::detail::is_compatible_integer_type_impl< bool, typename, typename >
 
struct  nlohmann::detail::is_compatible_integer_type_impl< true, RealIntegerType, CompatibleNumberIntegerType >
 
struct  nlohmann::detail::is_compatible_integer_type< RealIntegerType, CompatibleNumberIntegerType >
 
struct  nlohmann::detail::has_from_json< BasicJsonType, T >
 
struct  nlohmann::detail::has_non_default_from_json< BasicJsonType, T >
 
struct  nlohmann::detail::has_to_json< BasicJsonType, T >
 
struct  nlohmann::detail::is_compatible_complete_type< BasicJsonType, CompatibleCompleteType >
 
struct  nlohmann::detail::is_compatible_type< BasicJsonType, CompatibleType >
 
struct  nlohmann::detail::static_const< T >
 
class  nlohmann::detail::exception
 general exception of the basic_json class More...
 
class  nlohmann::detail::parse_error
 exception indicating a parse error More...
 
class  nlohmann::detail::invalid_iterator
 exception indicating errors with iterators More...
 
class  nlohmann::detail::type_error
 exception indicating executing a member function with a wrong type More...
 
class  nlohmann::detail::out_of_range
 exception indicating access out of the defined range More...
 
class  nlohmann::detail::other_error
 exception indicating other library errors More...
 
class  nlohmann::detail::parser< BasicJsonType >
 syntax analysis More...
 
class  nlohmann::detail::primitive_iterator_t
 
struct  nlohmann::detail::internal_iterator< BasicJsonType >
 an iterator value More...
 
class  nlohmann::detail::iter_impl< BasicJsonType >
 a template for a bidirectional iterator for the basic_json class More...
 
class  nlohmann::detail::iteration_proxy< IteratorType >
 proxy class for the items() function More...
 
class  nlohmann::detail::json_reverse_iterator< Base >
 a template for a reverse iterator class More...
 
struct  nlohmann::detail::output_adapter_protocol< CharType >
 abstract output adapter interface More...
 
class  nlohmann::detail::output_vector_adapter< CharType >
 output adapter for byte vectors More...
 
class  nlohmann::detail::output_stream_adapter< CharType >
 output adapter for output streams More...
 
class  nlohmann::detail::output_string_adapter< CharType, StringType >
 output adapter for basic_string More...
 
class  nlohmann::detail::output_adapter< CharType, StringType >
 

Namespaces

namespace  nlohmann
 namespace for Niels Lohmann
 
namespace  nlohmann::detail
 detail namespace with internal helper functions
 
namespace  nlohmann::detail::dtoa_impl
 implements the Grisu2 algorithm for binary to decimal floating-point conversion.
 

Macros

#define NLOHMANN_JSON_VERSION_MAJOR   3
 
#define NLOHMANN_JSON_VERSION_MINOR   1
 
#define NLOHMANN_JSON_VERSION_PATCH   2
 
#define NLOHMANN_JSON_FWD_HPP
 
#define JSON_DEPRECATED
 
#define JSON_THROW(exception)   std::abort()
 
#define JSON_TRY   if (true)
 
#define JSON_CATCH(exception)   if (false)
 
#define JSON_LIKELY(x)   x
 
#define JSON_UNLIKELY(x)   x
 
#define NLOHMANN_BASIC_JSON_TPL_DECLARATION
 
#define NLOHMANN_BASIC_JSON_TPL
 
#define NLOHMANN_JSON_HAS_HELPER(type)
 Helper to determine whether there's a key_type for T.
 

Typedefs

using nlohmann::json = basic_json<>
 default JSON class
 
template<bool B, typename T = void>
using nlohmann::detail::enable_if_t = typename std::enable_if< B, T >::type
 
template<typename T >
using nlohmann::detail::uncvref_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type
 
template<typename... Ts>
using nlohmann::detail::index_sequence_for = make_index_sequence< sizeof...(Ts)>
 
template<typename CharType >
using nlohmann::detail::output_adapter_t = std::shared_ptr< output_adapter_protocol< CharType > >
 a type to simplify interfaces
 

Functions

 nlohmann::detail::NLOHMANN_JSON_HAS_HELPER (mapped_type)
 
 nlohmann::detail::NLOHMANN_JSON_HAS_HELPER (key_type)
 
 nlohmann::detail::NLOHMANN_JSON_HAS_HELPER (value_type)
 
 nlohmann::detail::NLOHMANN_JSON_HAS_HELPER (iterator)
 

Macro Definition Documentation

◆ JSON_CATCH

#define JSON_CATCH (   exception)    if (false)

Definition at line 170 of file json.h.

◆ JSON_DEPRECATED

#define JSON_DEPRECATED

Definition at line 159 of file json.h.

◆ JSON_LIKELY

#define JSON_LIKELY (   x)    x

Definition at line 192 of file json.h.

◆ JSON_THROW

#define JSON_THROW (   exception)    std::abort()

Definition at line 168 of file json.h.

◆ JSON_TRY

#define JSON_TRY   if (true)

Definition at line 169 of file json.h.

◆ JSON_UNLIKELY

#define JSON_UNLIKELY (   x)    x

Definition at line 193 of file json.h.

◆ NLOHMANN_BASIC_JSON_TPL

#define NLOHMANN_BASIC_JSON_TPL
Value:
basic_json<ObjectType, ArrayType, StringType, BooleanType, \
NumberIntegerType, NumberUnsignedType, NumberFloatType, \
AllocatorType, JSONSerializer>

Definition at line 215 of file json.h.

◆ NLOHMANN_BASIC_JSON_TPL_DECLARATION

#define NLOHMANN_BASIC_JSON_TPL_DECLARATION
Value:
template <template <typename, typename, typename...> class ObjectType, \
template <typename, typename...> class ArrayType, \
class StringType, class BooleanType, class NumberIntegerType, \
class NumberUnsignedType, class NumberFloatType, \
template <typename> class AllocatorType, \
template <typename, typename = void> class JSONSerializer>

Definition at line 207 of file json.h.

◆ NLOHMANN_JSON_FWD_HPP

#define NLOHMANN_JSON_FWD_HPP

Definition at line 61 of file json.h.

◆ NLOHMANN_JSON_HAS_HELPER

#define NLOHMANN_JSON_HAS_HELPER (   type)
Value:
template <typename T> \
struct has_##type { \
private: \
template <typename U, typename = typename U::type> \
static int detect(U&&); \
static void detect(...); \
\
public: \
static constexpr bool value = \
std::is_integral<decltype(detect(std::declval<T>()))>::value; \
}
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275

Helper to determine whether there's a key_type for T.

This helper is used to tell associative containers apart from other containers such as sequence containers. For instance, std::map passes the test as it contains a mapped_type, whereas std::vector fails the test.

See also
http://stackoverflow.com/a/7728728/266378
Since
version 1.0.0, overworked in version 2.0.6

Definition at line 230 of file json.h.

◆ NLOHMANN_JSON_VERSION_MAJOR

#define NLOHMANN_JSON_VERSION_MAJOR   3

Definition at line 43 of file json.h.

◆ NLOHMANN_JSON_VERSION_MINOR

#define NLOHMANN_JSON_VERSION_MINOR   1

Definition at line 44 of file json.h.

◆ NLOHMANN_JSON_VERSION_PATCH

#define NLOHMANN_JSON_VERSION_PATCH   2

Definition at line 45 of file json.h.