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
7ceb06ba
Commit
7ceb06ba
authored
May 28, 2020
by
Francois Chabot
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1813-user-input' of
https://github.com/FrancoisChabot/json
into 1813-user-input
parents
dcf61759
d3caf93a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
README.md
README.md
+1
-1
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+22
-0
No files found.
README.md
View file @
7ceb06ba
...
...
@@ -148,7 +148,7 @@ Example:
include
(
FetchContent
)
FetchContent_Declare
(
json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_REPOSITORY https://github.com/nlohmann/json
.git
GIT_TAG v3.7.3
)
FetchContent_GetProperties
(
json
)
...
...
test/src/unit-regression.cpp
View file @
7ceb06ba
...
...
@@ -1890,6 +1890,28 @@ TEST_CASE("regression tests")
json
j
=
val
;
}
SECTION
(
"issue #1715 - json::from_cbor does not respect allow_exceptions = false when input is string literal"
)
{
SECTION
(
"string literal"
)
{
json
cbor
=
json
::
from_cbor
(
"B"
,
true
,
false
);
CHECK
(
cbor
.
is_discarded
());
}
SECTION
(
"string array"
)
{
const
char
input
[]
=
{
'B'
,
0x00
};
json
cbor
=
json
::
from_cbor
(
input
,
true
,
false
);
CHECK
(
cbor
.
is_discarded
());
}
SECTION
(
"std::string"
)
{
json
cbor
=
json
::
from_cbor
(
std
::
string
(
"B"
),
true
,
false
);
CHECK
(
cbor
.
is_discarded
());
}
}
SECTION
(
"issue #1805 - A pair<T1, T2> is json constructible only if T1 and T2 are json constructible"
)
{
static_assert
(
!
std
::
is_constructible
<
json
,
std
::
pair
<
std
::
string
,
NotSerializableData
>>::
value
,
""
);
...
...
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