Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
f8158997
Unverified
Commit
f8158997
authored
Oct 07, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
fixed documentation
parent
6d09cdec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
36 deletions
+38
-36
doc/examples/json_pointer.output
doc/examples/json_pointer.output
+1
-1
doc/examples/parse_error.output
doc/examples/parse_error.output
+1
-1
include/nlohmann/detail/input/json_sax.hpp
include/nlohmann/detail/input/json_sax.hpp
+1
-1
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+17
-16
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+18
-17
No files found.
doc/examples/json_pointer.output
View file @
f8158997
[json.exception.parse_error.107] parse error at 1: JSON pointer must be empty or begin with '/' - was: 'foo'
[json.exception.parse_error.107] parse error at
byte
1: JSON pointer must be empty or begin with '/' - was: 'foo'
[json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1'
[json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1'
[json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1'
[json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1'
doc/examples/parse_error.output
View file @
f8158997
message: [json.exception.parse_error.101] parse error at 8: syntax error - unexpected ']'; expected '[', '{', or a literal
message: [json.exception.parse_error.101] parse error at
line 1, column
8: syntax error - unexpected ']'; expected '[', '{', or a literal
exception id: 101
exception id: 101
byte position of error: 8
byte position of error: 8
include/nlohmann/detail/input/json_sax.hpp
View file @
f8158997
...
@@ -113,7 +113,7 @@ struct json_sax
...
@@ -113,7 +113,7 @@ struct json_sax
@brief a parse error occurred
@brief a parse error occurred
@param[in] position the position in the input where the error occurs
@param[in] position the position in the input where the error occurs
@param[in] last_token the last read token
@param[in] last_token the last read token
@param[in] e
rror_msg a detailed error message
@param[in] e
x an exception object describing the error
@return whether parsing should proceed (must return false)
@return whether parsing should proceed (must return false)
*/
*/
virtual
bool
parse_error
(
std
::
size_t
position
,
virtual
bool
parse_error
(
std
::
size_t
position
,
...
...
include/nlohmann/json.hpp
View file @
f8158997
...
@@ -5999,6 +5999,8 @@ class basic_json
...
@@ -5999,6 +5999,8 @@ class basic_json
@param[in] cb a parser callback function of type @ref parser_callback_t
@param[in] cb a parser callback function of type @ref parser_callback_t
which is used to control the deserialization by filtering unwanted values
which is used to control the deserialization by filtering unwanted values
(optional)
(optional)
@param[in] allow_exceptions whether to throw exceptions in case of a
parse error (optional, true by default)
@return result of the deserialization
@return result of the deserialization
...
@@ -6394,7 +6396,7 @@ class basic_json
...
@@ -6394,7 +6396,7 @@ class basic_json
vector in CBOR format.,to_cbor}
vector in CBOR format.,to_cbor}
@sa http://cbor.io
@sa http://cbor.io
@sa @ref from_cbor(detail::input_adapter
, const bool strict
) for the
@sa @ref from_cbor(detail::input_adapter
&&, const bool, const bool
) for the
analogous deserialization
analogous deserialization
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
...
@@ -6491,8 +6493,7 @@ class basic_json
...
@@ -6491,8 +6493,7 @@ class basic_json
vector in MessagePack format.,to_msgpack}
vector in MessagePack format.,to_msgpack}
@sa http://msgpack.org
@sa http://msgpack.org
@sa @ref from_msgpack(const std::vector<uint8_t>&, const size_t) for the
@sa @ref from_msgpack for the analogous deserialization
analogous deserialization
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
related UBJSON format
related UBJSON format
...
@@ -6589,7 +6590,7 @@ class basic_json
...
@@ -6589,7 +6590,7 @@ class basic_json
vector in UBJSON format.,to_ubjson}
vector in UBJSON format.,to_ubjson}
@sa http://ubjson.org
@sa http://ubjson.org
@sa @ref from_ubjson(detail::input_adapter
, const bool strict
) for the
@sa @ref from_ubjson(detail::input_adapter
&&, const bool, const bool
) for the
analogous deserialization
analogous deserialization
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
...
@@ -6704,14 +6705,14 @@ class basic_json
...
@@ -6704,14 +6705,14 @@ class basic_json
@sa http://cbor.io
@sa http://cbor.io
@sa @ref to_cbor(const basic_json&) for the analogous serialization
@sa @ref to_cbor(const basic_json&) for the analogous serialization
@sa @ref from_msgpack(detail::input_adapter, const bool, const bool) for the
@sa @ref from_msgpack(detail::input_adapter
&&
, const bool, const bool) for the
related MessagePack format
related MessagePack format
@sa @ref from_ubjson(detail::input_adapter, const bool, const bool) for the
@sa @ref from_ubjson(detail::input_adapter
&&
, const bool, const bool) for the
related UBJSON format
related UBJSON format
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
consume input adapters, removed start_index parameter, and added
consume input adapters, removed start_index parameter, and added
@a strict parameter since 3.0.0; added @allow_exceptions parameter
@a strict parameter since 3.0.0; added @a
a
llow_exceptions parameter
since 3.2.0
since 3.2.0
*/
*/
static
basic_json
from_cbor
(
detail
::
input_adapter
&&
i
,
static
basic_json
from_cbor
(
detail
::
input_adapter
&&
i
,
...
@@ -6725,7 +6726,7 @@ class basic_json
...
@@ -6725,7 +6726,7 @@ class basic_json
}
}
/*!
/*!
@copydoc from_cbor(detail::input_adapter, const bool, const bool)
@copydoc from_cbor(detail::input_adapter
&&
, const bool, const bool)
*/
*/
template
<
typename
A1
,
typename
A2
,
template
<
typename
A1
,
typename
A2
,
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
...
@@ -6807,14 +6808,14 @@ class basic_json
...
@@ -6807,14 +6808,14 @@ class basic_json
@sa http://msgpack.org
@sa http://msgpack.org
@sa @ref to_msgpack(const basic_json&) for the analogous serialization
@sa @ref to_msgpack(const basic_json&) for the analogous serialization
@sa @ref from_cbor(detail::input_adapter, const bool, const bool) for the
@sa @ref from_cbor(detail::input_adapter
&&
, const bool, const bool) for the
related CBOR format
related CBOR format
@sa @ref from_ubjson(detail::input_adapter, const bool, const bool) for
@sa @ref from_ubjson(detail::input_adapter
&&
, const bool, const bool) for
the related UBJSON format
the related UBJSON format
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
consume input adapters, removed start_index parameter, and added
consume input adapters, removed start_index parameter, and added
@a strict parameter since 3.0.0; added @allow_exceptions parameter
@a strict parameter since 3.0.0; added @a
a
llow_exceptions parameter
since 3.2.0
since 3.2.0
*/
*/
static
basic_json
from_msgpack
(
detail
::
input_adapter
&&
i
,
static
basic_json
from_msgpack
(
detail
::
input_adapter
&&
i
,
...
@@ -6828,7 +6829,7 @@ class basic_json
...
@@ -6828,7 +6829,7 @@ class basic_json
}
}
/*!
/*!
@copydoc from_msgpack(detail::input_adapter, const bool, const bool)
@copydoc from_msgpack(detail::input_adapter
&&
, const bool, const bool)
*/
*/
template
<
typename
A1
,
typename
A2
,
template
<
typename
A1
,
typename
A2
,
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
...
@@ -6892,12 +6893,12 @@ class basic_json
...
@@ -6892,12 +6893,12 @@ class basic_json
@sa http://ubjson.org
@sa http://ubjson.org
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
analogous serialization
analogous serialization
@sa @ref from_cbor(detail::input_adapter, const bool, const bool) for the
@sa @ref from_cbor(detail::input_adapter
&&
, const bool, const bool) for the
related CBOR format
related CBOR format
@sa @ref from_msgpack(detail::input_adapter, const bool, const bool) for
@sa @ref from_msgpack(detail::input_adapter
&&
, const bool, const bool) for
the related MessagePack format
the related MessagePack format
@since version 3.1.0; added @allow_exceptions parameter since 3.2.0
@since version 3.1.0; added @a
a
llow_exceptions parameter since 3.2.0
*/
*/
static
basic_json
from_ubjson
(
detail
::
input_adapter
&&
i
,
static
basic_json
from_ubjson
(
detail
::
input_adapter
&&
i
,
const
bool
strict
=
true
,
const
bool
strict
=
true
,
...
@@ -6910,7 +6911,7 @@ class basic_json
...
@@ -6910,7 +6911,7 @@ class basic_json
}
}
/*!
/*!
@copydoc from_ubjson(detail::input_adapter, const bool, const bool)
@copydoc from_ubjson(detail::input_adapter
&&
, const bool, const bool)
*/
*/
template
<
typename
A1
,
typename
A2
,
template
<
typename
A1
,
typename
A2
,
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
...
...
single_include/nlohmann/json.hpp
View file @
f8158997
...
@@ -4103,7 +4103,7 @@ struct json_sax
...
@@ -4103,7 +4103,7 @@ struct json_sax
@brief a parse error occurred
@brief a parse error occurred
@param[in] position the position in the input where the error occurs
@param[in] position the position in the input where the error occurs
@param[in] last_token the last read token
@param[in] last_token the last read token
@param[in] e
rror_msg a detailed error message
@param[in] e
x an exception object describing the error
@return whether parsing should proceed (must return false)
@return whether parsing should proceed (must return false)
*/
*/
virtual
bool
parse_error
(
std
::
size_t
position
,
virtual
bool
parse_error
(
std
::
size_t
position
,
...
@@ -17319,6 +17319,8 @@ class basic_json
...
@@ -17319,6 +17319,8 @@ class basic_json
@param[in] cb a parser callback function of type @ref parser_callback_t
@param[in] cb a parser callback function of type @ref parser_callback_t
which is used to control the deserialization by filtering unwanted values
which is used to control the deserialization by filtering unwanted values
(optional)
(optional)
@param[in] allow_exceptions whether to throw exceptions in case of a
parse error (optional, true by default)
@return result of the deserialization
@return result of the deserialization
...
@@ -17714,7 +17716,7 @@ class basic_json
...
@@ -17714,7 +17716,7 @@ class basic_json
vector in CBOR format.,to_cbor}
vector in CBOR format.,to_cbor}
@sa http://cbor.io
@sa http://cbor.io
@sa @ref from_cbor(detail::input_adapter
, const bool strict
) for the
@sa @ref from_cbor(detail::input_adapter
&&, const bool, const bool
) for the
analogous deserialization
analogous deserialization
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
...
@@ -17811,8 +17813,7 @@ class basic_json
...
@@ -17811,8 +17813,7 @@ class basic_json
vector in MessagePack format.,to_msgpack}
vector in MessagePack format.,to_msgpack}
@sa http://msgpack.org
@sa http://msgpack.org
@sa @ref from_msgpack(const std::vector<uint8_t>&, const size_t) for the
@sa @ref from_msgpack for the analogous deserialization
analogous deserialization
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
related UBJSON format
related UBJSON format
...
@@ -17909,7 +17910,7 @@ class basic_json
...
@@ -17909,7 +17910,7 @@ class basic_json
vector in UBJSON format.,to_ubjson}
vector in UBJSON format.,to_ubjson}
@sa http://ubjson.org
@sa http://ubjson.org
@sa @ref from_ubjson(detail::input_adapter
, const bool strict
) for the
@sa @ref from_ubjson(detail::input_adapter
&&, const bool, const bool
) for the
analogous deserialization
analogous deserialization
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_cbor(const basic_json& for the related CBOR format
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
@sa @ref to_msgpack(const basic_json&) for the related MessagePack format
...
@@ -18024,14 +18025,14 @@ class basic_json
...
@@ -18024,14 +18025,14 @@ class basic_json
@sa http://cbor.io
@sa http://cbor.io
@sa @ref to_cbor(const basic_json&) for the analogous serialization
@sa @ref to_cbor(const basic_json&) for the analogous serialization
@sa @ref from_msgpack(detail::input_adapter, const bool, const bool) for the
@sa @ref from_msgpack(detail::input_adapter
&&
, const bool, const bool) for the
related MessagePack format
related MessagePack format
@sa @ref from_ubjson(detail::input_adapter, const bool, const bool) for the
@sa @ref from_ubjson(detail::input_adapter
&&
, const bool, const bool) for the
related UBJSON format
related UBJSON format
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
consume input adapters, removed start_index parameter, and added
consume input adapters, removed start_index parameter, and added
@a strict parameter since 3.0.0; added @allow_exceptions parameter
@a strict parameter since 3.0.0; added @a
a
llow_exceptions parameter
since 3.2.0
since 3.2.0
*/
*/
static
basic_json
from_cbor
(
detail
::
input_adapter
&&
i
,
static
basic_json
from_cbor
(
detail
::
input_adapter
&&
i
,
...
@@ -18045,7 +18046,7 @@ class basic_json
...
@@ -18045,7 +18046,7 @@ class basic_json
}
}
/*!
/*!
@copydoc from_cbor(detail::input_adapter, const bool, const bool)
@copydoc from_cbor(detail::input_adapter
&&
, const bool, const bool)
*/
*/
template
<
typename
A1
,
typename
A2
,
template
<
typename
A1
,
typename
A2
,
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
...
@@ -18127,14 +18128,14 @@ class basic_json
...
@@ -18127,14 +18128,14 @@ class basic_json
@sa http://msgpack.org
@sa http://msgpack.org
@sa @ref to_msgpack(const basic_json&) for the analogous serialization
@sa @ref to_msgpack(const basic_json&) for the analogous serialization
@sa @ref from_cbor(detail::input_adapter, const bool, const bool) for the
@sa @ref from_cbor(detail::input_adapter
&&
, const bool, const bool) for the
related CBOR format
related CBOR format
@sa @ref from_ubjson(detail::input_adapter, const bool, const bool) for
@sa @ref from_ubjson(detail::input_adapter
&&
, const bool, const bool) for
the related UBJSON format
the related UBJSON format
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
@since version 2.0.9; parameter @a start_index since 2.1.1; changed to
consume input adapters, removed start_index parameter, and added
consume input adapters, removed start_index parameter, and added
@a strict parameter since 3.0.0; added @allow_exceptions parameter
@a strict parameter since 3.0.0; added @a
a
llow_exceptions parameter
since 3.2.0
since 3.2.0
*/
*/
static
basic_json
from_msgpack
(
detail
::
input_adapter
&&
i
,
static
basic_json
from_msgpack
(
detail
::
input_adapter
&&
i
,
...
@@ -18148,7 +18149,7 @@ class basic_json
...
@@ -18148,7 +18149,7 @@ class basic_json
}
}
/*!
/*!
@copydoc from_msgpack(detail::input_adapter, const bool, const bool)
@copydoc from_msgpack(detail::input_adapter
&&
, const bool, const bool)
*/
*/
template
<
typename
A1
,
typename
A2
,
template
<
typename
A1
,
typename
A2
,
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
...
@@ -18212,12 +18213,12 @@ class basic_json
...
@@ -18212,12 +18213,12 @@ class basic_json
@sa http://ubjson.org
@sa http://ubjson.org
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
@sa @ref to_ubjson(const basic_json&, const bool, const bool) for the
analogous serialization
analogous serialization
@sa @ref from_cbor(detail::input_adapter, const bool, const bool) for the
@sa @ref from_cbor(detail::input_adapter
&&
, const bool, const bool) for the
related CBOR format
related CBOR format
@sa @ref from_msgpack(detail::input_adapter, const bool, const bool) for
@sa @ref from_msgpack(detail::input_adapter
&&
, const bool, const bool) for
the related MessagePack format
the related MessagePack format
@since version 3.1.0; added @allow_exceptions parameter since 3.2.0
@since version 3.1.0; added @a
a
llow_exceptions parameter since 3.2.0
*/
*/
static
basic_json
from_ubjson
(
detail
::
input_adapter
&&
i
,
static
basic_json
from_ubjson
(
detail
::
input_adapter
&&
i
,
const
bool
strict
=
true
,
const
bool
strict
=
true
,
...
@@ -18230,7 +18231,7 @@ class basic_json
...
@@ -18230,7 +18231,7 @@ class basic_json
}
}
/*!
/*!
@copydoc from_ubjson(detail::input_adapter, const bool, const bool)
@copydoc from_ubjson(detail::input_adapter
&&
, const bool, const bool)
*/
*/
template
<
typename
A1
,
typename
A2
,
template
<
typename
A1
,
typename
A2
,
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
detail
::
enable_if_t
<
std
::
is_constructible
<
detail
::
input_adapter
,
A1
,
A2
>
::
value
,
int
>
=
0
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment