JSON for Modern C++  3.0
json.hpp File Reference
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for json.hpp:

Go to the source code of this file.

Classes

struct  nlohmann::has_mapped_type< T >
 
class  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >
 JSON. More...
 
union  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::json_value
 a JSON value More...
 
union  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::internal_iterator< array_iterator_t, object_iterator_t >
 an iterator value More...
 
class  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::iterator
 a random access iterator for the basic_json class More...
 
class  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::const_iterator
 a const random access iterator for the basic_json class More...
 
class  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::reverse_iterator
 a reverse random access iterator for the basic_json class More...
 
class  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::const_reverse_iterator
 a const reverse random access iterator for the basic_json class More...
 
class  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::lexer
 lexical analysis More...
 
class  nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::parser
 syntax analysis More...
 
struct  std::hash< nlohmann::json >
 hash value for JSON objects More...
 

Namespaces

 nlohmann
 namespace for Niels Lohmann
 

Typedefs

using nlohmann::json = basic_json<>
 default JSON class More...
 

Functions

template<>
void std::swap (nlohmann::json &j1, nlohmann::json &j2) noexcept(is_nothrow_move_constructible< nlohmann::json >::value andis_nothrow_move_assignable< nlohmann::json >::value)
 exchanges the values of two JSON objects More...
 
nlohmann::json operator""_json (const char *s, std::size_t)
 

Detailed Description

Author
Niels Lohmann http://nlohmann.me
See also
https://github.com/nlohmann/json

Definition in file json.hpp.

Function Documentation

nlohmann::json operator""_json ( const char *  s,
std::size_t   
)
inline

This operator implements a user-defined string literal for JSON objects. It can be used by adding "_json" to a string literal and returns a JSON object if no parse error occurred.

Parameters
sa string representation of a JSON object
Returns
a JSON object

Definition at line 4726 of file json.hpp.

References nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::parse().

4727 {
4728  return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
4729  (const_cast<char*>(s)));
4730 }
static basic_json parse(const string_t &s)
deserialize from string
Definition: json.hpp:1887

Here is the call graph for this function: