Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
00cb98a3
Unverified
Commit
00cb98a3
authored
Oct 21, 2019
by
Niels Lohmann
Committed by
GitHub
Oct 21, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1803 from flopp/spelling
Fix some spelling errors - mostly in comments & documentation.
parents
0245ae51
b93d414a
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
20 additions
and
20 deletions
+20
-20
json_pointer__operator_add.cpp
doc/examples/json_pointer__operator_add.cpp
+1
-1
json_pointer__operator_add_binary.cpp
doc/examples/json_pointer__operator_add_binary.cpp
+1
-1
to_chars.hpp
include/nlohmann/detail/conversions/to_chars.hpp
+1
-1
binary_reader.hpp
include/nlohmann/detail/input/binary_reader.hpp
+1
-1
iter_impl.hpp
include/nlohmann/detail/iterators/iter_impl.hpp
+2
-2
json_pointer.hpp
include/nlohmann/detail/json_pointer.hpp
+1
-1
json.hpp
include/nlohmann/json.hpp
+1
-1
json.hpp
single_include/nlohmann/json.hpp
+6
-6
unit-cbor.cpp
test/src/unit-cbor.cpp
+1
-1
unit-class_parser.cpp
test/src/unit-class_parser.cpp
+1
-1
unit-msgpack.cpp
test/src/unit-msgpack.cpp
+1
-1
unit-regression.cpp
test/src/unit-regression.cpp
+1
-1
unit-udt.cpp
test/src/unit-udt.cpp
+1
-1
unit-unicode.cpp
test/src/unit-unicode.cpp
+1
-1
No files found.
doc/examples/json_pointer__operator_add.cpp
View file @
00cb98a3
...
@@ -9,7 +9,7 @@ int main()
...
@@ -9,7 +9,7 @@ int main()
json
::
json_pointer
ptr
(
"/foo"
);
json
::
json_pointer
ptr
(
"/foo"
);
std
::
cout
<<
ptr
<<
'\n'
;
std
::
cout
<<
ptr
<<
'\n'
;
// app
p
end a JSON Pointer
// append a JSON Pointer
ptr
/=
json
::
json_pointer
(
"/bar/baz"
);
ptr
/=
json
::
json_pointer
(
"/bar/baz"
);
std
::
cout
<<
ptr
<<
'\n'
;
std
::
cout
<<
ptr
<<
'\n'
;
...
...
doc/examples/json_pointer__operator_add_binary.cpp
View file @
00cb98a3
...
@@ -8,7 +8,7 @@ int main()
...
@@ -8,7 +8,7 @@ int main()
// create a JSON pointer
// create a JSON pointer
json
::
json_pointer
ptr
(
"/foo"
);
json
::
json_pointer
ptr
(
"/foo"
);
// app
p
end a JSON Pointer
// append a JSON Pointer
std
::
cout
<<
ptr
/
json
::
json_pointer
(
"/bar/baz"
)
<<
'\n'
;
std
::
cout
<<
ptr
/
json
::
json_pointer
(
"/bar/baz"
)
<<
'\n'
;
// append a string
// append a string
...
...
include/nlohmann/detail/conversions/to_chars.hpp
View file @
00cb98a3
...
@@ -330,7 +330,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e)
...
@@ -330,7 +330,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e)
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
// ==> 2^(alpha - e - 1) <= c
//
//
// If c were an exa
k
t power of ten, i.e. c = 10^k, one may determine k as
// If c were an exa
c
t power of ten, i.e. c = 10^k, one may determine k as
//
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
// = ceil( (alpha - e - 1) * log_10(2) )
...
...
include/nlohmann/detail/input/binary_reader.hpp
View file @
00cb98a3
...
@@ -1929,7 +1929,7 @@ class binary_reader
...
@@ -1929,7 +1929,7 @@ class binary_reader
/*!
/*!
@param[in] format the current format
@param[in] format the current format
@param[in] detail a detailed error message
@param[in] detail a detailed error message
@param[in] context further conte
c
t information
@param[in] context further conte
x
t information
@return a message string to use in the parse_error exceptions
@return a message string to use in the parse_error exceptions
*/
*/
std
::
string
exception_message
(
const
input_format_t
format
,
std
::
string
exception_message
(
const
input_format_t
format
,
...
...
include/nlohmann/detail/iterators/iter_impl.hpp
View file @
00cb98a3
...
@@ -121,8 +121,8 @@ class iter_impl
...
@@ -121,8 +121,8 @@ class iter_impl
/*!
/*!
@brief const copy constructor
@brief const copy constructor
@param[in] other const iterator to copy from
@param[in] other const iterator to copy from
@note This copy const
uctor had to be defined explicite
ly to circumvent a bug
@note This copy const
ructor had to be defined explicit
ly to circumvent a bug
occuring on msvc v19.0 compiler (VS 2015) debug build. For more
occur
r
ing on msvc v19.0 compiler (VS 2015) debug build. For more
information refer to: https://github.com/nlohmann/json/issues/1608
information refer to: https://github.com/nlohmann/json/issues/1608
*/
*/
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
...
...
include/nlohmann/detail/json_pointer.hpp
View file @
00cb98a3
...
@@ -126,7 +126,7 @@ class json_pointer
...
@@ -126,7 +126,7 @@ class json_pointer
/*!
/*!
@brief append an array index at the end of this JSON pointer
@brief append an array index at the end of this JSON pointer
@param[in] array_index array index
ot
append
@param[in] array_index array index
to
append
@return JSON pointer with @a array_index appended
@return JSON pointer with @a array_index appended
@liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}
@liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}
...
...
include/nlohmann/json.hpp
View file @
00cb98a3
...
@@ -4019,7 +4019,7 @@ class basic_json
...
@@ -4019,7 +4019,7 @@ class basic_json
/*!
/*!
@brief check the existence of an element in a JSON object given a JSON pointer
@brief check the existence of an element in a JSON object given a JSON pointer
Check w
eh
ther the given JSON pointer @a ptr can be resolved in the current
Check w
he
ther the given JSON pointer @a ptr can be resolved in the current
JSON value.
JSON value.
@note This method can be executed on any JSON value type.
@note This method can be executed on any JSON value type.
...
...
single_include/nlohmann/json.hpp
View file @
00cb98a3
...
@@ -7056,7 +7056,7 @@ class binary_reader
...
@@ -7056,7 +7056,7 @@ class binary_reader
/*!
/*!
@param[in] format the current format
@param[in] format the current format
@param[in] detail a detailed error message
@param[in] detail a detailed error message
@param[in] context further conte
c
t information
@param[in] context further conte
x
t information
@return a message string to use in the parse_error exceptions
@return a message string to use in the parse_error exceptions
*/
*/
std
::
string
exception_message
(
const
input_format_t
format
,
std
::
string
exception_message
(
const
input_format_t
format
,
...
@@ -9414,8 +9414,8 @@ class iter_impl
...
@@ -9414,8 +9414,8 @@ class iter_impl
/*!
/*!
@brief const copy constructor
@brief const copy constructor
@param[in] other const iterator to copy from
@param[in] other const iterator to copy from
@note This copy const
uctor had to be defined explicite
ly to circumvent a bug
@note This copy const
ructor had to be defined explicit
ly to circumvent a bug
occuring on msvc v19.0 compiler (VS 2015) debug build. For more
occur
r
ing on msvc v19.0 compiler (VS 2015) debug build. For more
information refer to: https://github.com/nlohmann/json/issues/1608
information refer to: https://github.com/nlohmann/json/issues/1608
*/
*/
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
...
@@ -10187,7 +10187,7 @@ class json_pointer
...
@@ -10187,7 +10187,7 @@ class json_pointer
/*!
/*!
@brief append an array index at the end of this JSON pointer
@brief append an array index at the end of this JSON pointer
@param[in] array_index array index
ot
append
@param[in] array_index array index
to
append
@return JSON pointer with @a array_index appended
@return JSON pointer with @a array_index appended
@liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}
@liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}
...
@@ -12966,7 +12966,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e)
...
@@ -12966,7 +12966,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e)
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
// ==> 2^(alpha - e - 1) <= c
//
//
// If c were an exa
k
t power of ten, i.e. c = 10^k, one may determine k as
// If c were an exa
c
t power of ten, i.e. c = 10^k, one may determine k as
//
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
// = ceil( (alpha - e - 1) * log_10(2) )
...
@@ -18549,7 +18549,7 @@ class basic_json
...
@@ -18549,7 +18549,7 @@ class basic_json
/*!
/*!
@brief check the existence of an element in a JSON object given a JSON pointer
@brief check the existence of an element in a JSON object given a JSON pointer
Check w
eh
ther the given JSON pointer @a ptr can be resolved in the current
Check w
he
ther the given JSON pointer @a ptr can be resolved in the current
JSON value.
JSON value.
@note This method can be executed on any JSON value type.
@note This method can be executed on any JSON value type.
...
...
test/src/unit-cbor.cpp
View file @
00cb98a3
...
@@ -1287,7 +1287,7 @@ TEST_CASE("CBOR")
...
@@ -1287,7 +1287,7 @@ TEST_CASE("CBOR")
}
}
}
}
SECTION
(
"additonal deserialization"
)
SECTION
(
"addit
i
onal deserialization"
)
{
{
SECTION
(
"0x7b (string)"
)
SECTION
(
"0x7b (string)"
)
{
{
...
...
test/src/unit-class_parser.cpp
View file @
00cb98a3
...
@@ -210,7 +210,7 @@ json parser_helper(const std::string& s)
...
@@ -210,7 +210,7 @@ json parser_helper(const std::string& s)
json
j
;
json
j
;
json
::
parser
(
nlohmann
::
detail
::
input_adapter
(
s
)).
parse
(
true
,
j
);
json
::
parser
(
nlohmann
::
detail
::
input_adapter
(
s
)).
parse
(
true
,
j
);
// if this line was reached, no exception ocurred
// if this line was reached, no exception oc
c
urred
// -> check if result is the same without exceptions
// -> check if result is the same without exceptions
json
j_nothrow
;
json
j_nothrow
;
CHECK_NOTHROW
(
json
::
parser
(
nlohmann
::
detail
::
input_adapter
(
s
),
nullptr
,
false
).
parse
(
true
,
j_nothrow
));
CHECK_NOTHROW
(
json
::
parser
(
nlohmann
::
detail
::
input_adapter
(
s
),
nullptr
,
false
).
parse
(
true
,
j_nothrow
));
...
...
test/src/unit-msgpack.cpp
View file @
00cb98a3
...
@@ -1359,7 +1359,7 @@ TEST_CASE("MessagePack roundtrips" * doctest::skip())
...
@@ -1359,7 +1359,7 @@ TEST_CASE("MessagePack roundtrips" * doctest::skip())
{
{
SECTION
(
"input from msgpack-python"
)
SECTION
(
"input from msgpack-python"
)
{
{
// most of these are exluded due to differences in key order (not a real problem)
// most of these are ex
c
luded due to differences in key order (not a real problem)
auto
exclude_packed
=
std
::
set
<
std
::
string
>
auto
exclude_packed
=
std
::
set
<
std
::
string
>
{
{
"test/data/json.org/1.json"
,
"test/data/json.org/1.json"
,
...
...
test/src/unit-regression.cpp
View file @
00cb98a3
...
@@ -164,7 +164,7 @@ TEST_CASE("regression tests")
...
@@ -164,7 +164,7 @@ TEST_CASE("regression tests")
{
{
SECTION
(
"issue #60 - Double quotation mark is not parsed correctly"
)
SECTION
(
"issue #60 - Double quotation mark is not parsed correctly"
)
{
{
SECTION
(
"escape_do
bu
lequote"
)
SECTION
(
"escape_do
ub
lequote"
)
{
{
auto
s
=
"[
\"\\\"
foo
\\\"\"
]"
;
auto
s
=
"[
\"\\\"
foo
\\\"\"
]"
;
json
j
=
json
::
parse
(
s
);
json
j
=
json
::
parse
(
s
);
...
...
test/src/unit-udt.cpp
View file @
00cb98a3
...
@@ -238,7 +238,7 @@ void from_json(const nlohmann::json& j, contact_book& cb)
...
@@ -238,7 +238,7 @@ void from_json(const nlohmann::json& j, contact_book& cb)
TEST_CASE
(
"basic usage"
*
doctest
::
test_suite
(
"udt"
))
TEST_CASE
(
"basic usage"
*
doctest
::
test_suite
(
"udt"
))
{
{
// a bit narcissic maybe :) ?
// a bit narcissi
sti
c maybe :) ?
const
udt
::
age
a
const
udt
::
age
a
{
{
23
23
...
...
test/src/unit-unicode.cpp
View file @
00cb98a3
...
@@ -1152,7 +1152,7 @@ TEST_CASE("Unicode" * doctest::skip())
...
@@ -1152,7 +1152,7 @@ TEST_CASE("Unicode" * doctest::skip())
json
j
;
json
j
;
CHECK_NOTHROW
(
f
>>
j
);
CHECK_NOTHROW
(
f
>>
j
);
// the array has 1112064 + 1 elemnts (a terminating "null" value)
// the array has 1112064 + 1 elem
e
nts (a terminating "null" value)
// Note: 1112064 = 0x1FFFFF code points - 2048 invalid values between
// Note: 1112064 = 0x1FFFFF code points - 2048 invalid values between
// 0xD800 and 0xDFFF.
// 0xD800 and 0xDFFF.
CHECK
(
j
.
size
()
==
1112065
);
CHECK
(
j
.
size
()
==
1112065
);
...
...
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