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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
class nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::parser
Definition at line 4468 of file json.hpp.
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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::parser::parser |
( |
const string_t & |
s | ) |
|
|
inline |
Definition at line 4472 of file json.hpp.
lexer::token_type get_token()
get next token from lexer
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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::parser::parser |
( |
std::istream & |
_is | ) |
|
|
inline |
Definition at line 4479 of file json.hpp.
lexer::token_type get_token()
get next token from lexer
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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
Definition at line 4653 of file json.hpp.
4657 std::string error_msg =
"parse error - unexpected \'";
4661 throw std::invalid_argument(error_msg);
string_t get_token() const noexcept
return string representation of last read token
static std::string token_type_name(token_type t) noexcept
return name of values of type token_type
lexer::token_type last_token
the type of the last read token
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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
basic_json nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::parser::parse_internal |
( |
| ) |
|
|
inlineprivate |
Definition at line 4497 of file json.hpp.
References nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::push_back().
4613 if (std::isnan(float_val))
4615 throw std::invalid_argument(std::string(
"parse error - ") +
4623 if (
approx(float_val, static_cast<number_float_t>(int_val)))
4637 std::string error_msg =
"parse error - unexpected \'";
4639 error_msg +=
"\' (";
4641 throw std::invalid_argument(error_msg);
the character for array begin "["
the "null" literal
number_float_t get_number() const
return number value for number tokens
void expect(typename lexer::token_type t) const
static bool approx(const T a, const T b)
"equality" comparison for floating point numbers
the "false" literal
lexer::token_type get_token()
get next token from lexer
basic_json parse_internal()
the actual parser
the character for object end "}"
string_t get_token() const noexcept
return string representation of last read token
string_t get_string() const
return string value for string tokens
NumberIntegerType number_integer_t
a type for a number (integer)
a string - use get_string() for actual value
the "true" literal
the name separator ":"
array (ordered collection of values)
static std::string token_type_name(token_type t) noexcept
return name of values of type token_type
object (unordered set of name/value pairs)
basic_json() noexcept=default
create a null object (implicitly)
the character for array end "]"
a number - use get_number() for actual value
the character for object begin "{"
the value separator ","
lexer::token_type last_token
the type of the last read token
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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
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 = int64_t, class NumberFloatType = double, template< typename U > class Allocator = std::allocator>
lexer nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::parser::m_lexer |
|
private |