Template Class basic_json

Inheritance Relationships

Base Type

  • public nlohmann::detail::json_base_class< void >

Class Documentation

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>, class CustomBaseClass = void>
class basic_json : public nlohmann::detail::json_base_class<void>

namespace for Niels Lohmann

a class to store JSON values

a class to store JSON values

Since

version 1.0.0

Since

version 1.0.0

Public Types

using value_t = detail::value_t
using json_pointer = ::nlohmann::json_pointer<StringType>
template<typename T, typename SFINAE>
using json_serializer = JSONSerializer<T, SFINAE>
using error_handler_t = detail::error_handler_t
using cbor_tag_handler_t = detail::cbor_tag_handler_t
using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>
using input_format_t = detail::input_format_t
using json_sax_t = json_sax<basic_json>
parse_error = { using exception=detail::exception detail::parse_error
using invalid_iterator = detail::invalid_iterator
using type_error = detail::type_error
using out_of_range = detail::out_of_range
using other_error = detail::other_error
reference = { * the type of elements in a basic_json container using value_type=basic_json value_type &
using const_reference = const value_type&
using difference_type = std::ptrdiff_t
using size_type = std::size_t
using allocator_type = AllocatorType<basic_json>
using pointer = typename std::allocator_traits<allocator_type>::pointer
using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer
using iterator = iter_impl<basic_json>
using const_iterator = iter_impl<const basic_json>
using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>
using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>

Public Members

*JSON Pointer
*SAX interface type
**brief returns the allocator associated with the container *sa https
*brief returns version information on the library *sa https
result ["copyright"]  = "(C) 2013-2023 Niels Lohmann"
return result
***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa https  {*  @brief default object key comparator type*  The actual object key comparator type (@ref object_comparator_t) may be*  different.*  @sa https:using default_object_comparator_t = std::less<StringType>
***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa basic_json
***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa default_object_comparator_t
***name JSON value data types *The data types to store a JSON value These types are derived from *the template arguments passed to class ref basic_json **brief a type for an object *sa AllocatorType< std::pair< const StringType, basic_json > >
*brief a type for an array *sa https
*brief a type for an array *sa AllocatorType< basic_json >
*brief a type for a string *sa https
*brief a type for a boolean *sa https
*brief a type for a number *(integer) *@sa https brief a type for a number *(unsigned) *@sa https brief a type for a number *(floating-point) *@sa https brief a type for a packed binary type *sa https
*brief object key comparator type *sa https
***brief parser event types *sa https
*brief per element parser callback type *sa https
***name constructors and destructors *Constructors of class ref basic_json copy move constructor copy * assignment
***name constructors and destructors *Constructors of class ref basic_json copy move constructor copy functions creating and the destructor *data m_data   = {}

Public Static Attributes

static ***name constructors and destructors *Constructors of class ref basic_json copy move constructor copy functions creating objects

Friends

friend struct detail::external_constructor
friend class ::nlohmann::json_pointer
friend class ::nlohmann::detail::parser
friend class ::nlohmann::detail::iter_impl
friend class ::nlohmann::detail::binary_writer
friend class ::nlohmann::detail::binary_reader
friend class ::nlohmann::detail::json_sax_dom_parser
friend class ::nlohmann::detail::json_sax_dom_callback_parser
friend class ::nlohmann::detail::exception