Motor OpenGL
Cargando...
Buscando...
Nada coincide
Referencia de la clase detail::parse_error

exception indicating a parse error Más...

#include <json.hpp>

Diagrama de herencia de detail::parse_error

Métodos públicos estáticos

template<typename BasicJsonContext, enable_if_t< is_basic_json_context< BasicJsonContext >::value, int > = 0>
static parse_error create (int id_, const position_t &pos, const std::string &what_arg, BasicJsonContext context)
 create a parse error exception

Atributos públicos

const std::size_t byte
 byte index of the parse error
Atributos públicos heredados de detail::exception
const int id
 the id of the exception

Otros miembros heredados

Métodos públicos heredados de detail::exception
const char * what () const noexcept override
 returns the explanatory string

Descripción detallada

exception indicating a parse error

Ver también
https://json.nlohmann.me/api/basic_json/parse_error/

Documentación de funciones miembro

◆ create()

template<typename BasicJsonContext, enable_if_t< is_basic_json_context< BasicJsonContext >::value, int > = 0>
parse_error detail::parse_error::create ( int id_,
const position_t & pos,
const std::string & what_arg,
BasicJsonContext context )
inlinestatic

create a parse error exception

Parámetros
[in]id_the id of the exception
[in]posthe position where the error occurred (or with chars_read_total=0 if the position cannot be determined)
[in]what_argthe explanatory string
Devuelve
parse_error object

Documentación de datos miembro

◆ byte

const std::size_t detail::parse_error::byte

byte index of the parse error

The byte index of the last read character in the input file.

Nota
For an input with n bytes, 1 is the index of the first character and n+1 is the index of the terminating null byte or the end of file. This also holds true when reading a byte vector (CBOR or MessagePack).