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
39dd775e
Unverified
Commit
39dd775e
authored
Jun 28, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔨
cleanup after #1134
parent
86a96b05
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
143 deletions
+139
-143
include/nlohmann/detail/conversions/to_json.hpp
include/nlohmann/detail/conversions/to_json.hpp
+3
-4
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+136
-139
No files found.
include/nlohmann/detail/conversions/to_json.hpp
View file @
39dd775e
...
...
@@ -10,6 +10,7 @@
#include <nlohmann/detail/meta.hpp>
#include <nlohmann/detail/value_t.hpp>
#include <nlohmann/detail/iterators/iteration_proxy.hpp>
namespace
nlohmann
{
...
...
@@ -294,14 +295,12 @@ void to_json(BasicJsonType& j, const std::pair<Args...>& p)
j
=
{
p
.
first
,
p
.
second
};
}
template
<
typename
IteratorType
>
class
iteration_proxy
;
// TODO: Forward decl needed, maybe move somewhere else
// for https://github.com/nlohmann/json/pull/1134
template
<
typename
BasicJsonType
,
typename
T
,
enable_if_t
<
std
::
is_same
<
T
,
typename
iteration_proxy
<
typename
BasicJsonType
::
iterator
>
::
iteration_proxy_internal
>::
value
,
int
>
=
0
>
void
to_json
(
BasicJsonType
&
j
,
T
b
)
noexcept
{
typename
BasicJsonType
::
object_t
tmp_obj
;
tmp_obj
[
b
.
key
()]
=
b
.
value
();
// TODO: maybe there is a better way?
external_constructor
<
value_t
::
object
>::
construct
(
j
,
std
::
move
(
tmp_obj
));
j
=
{{
b
.
key
(),
b
.
value
()}};
}
template
<
typename
BasicJsonType
,
typename
Tuple
,
std
::
size_t
...
Idx
>
...
...
single_include/nlohmann/json.hpp
View file @
39dd775e
This diff is collapsed.
Click to expand it.
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