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
ed6b1464
Commit
ed6b1464
authored
Mar 10, 2018
by
Vitaliy Manushkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump to alternate implementation of string, as defined in basic_json template…
dump to alternate implementation of string, as defined in basic_json template (changes to amalgamated code)
parent
faccc37d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
json.hpp
single_include/nlohmann/json.hpp
+6
-6
No files found.
single_include/nlohmann/json.hpp
View file @
ed6b1464
...
@@ -4777,11 +4777,11 @@ class output_stream_adapter : public output_adapter_protocol<CharType>
...
@@ -4777,11 +4777,11 @@ class output_stream_adapter : public output_adapter_protocol<CharType>
};
};
/// output adapter for basic_string
/// output adapter for basic_string
template
<
typename
CharType
>
template
<
typename
CharType
,
typename
StringType
=
std
::
basic_string
<
CharType
>
>
class
output_string_adapter
:
public
output_adapter_protocol
<
CharType
>
class
output_string_adapter
:
public
output_adapter_protocol
<
CharType
>
{
{
public
:
public
:
explicit
output_string_adapter
(
std
::
basic_string
<
CharType
>
&
s
)
:
str
(
s
)
{}
explicit
output_string_adapter
(
StringType
&
s
)
:
str
(
s
)
{}
void
write_character
(
CharType
c
)
override
void
write_character
(
CharType
c
)
override
{
{
...
@@ -4794,10 +4794,10 @@ class output_string_adapter : public output_adapter_protocol<CharType>
...
@@ -4794,10 +4794,10 @@ class output_string_adapter : public output_adapter_protocol<CharType>
}
}
private
:
private
:
std
::
basic_string
<
CharType
>
&
str
;
StringType
&
str
;
};
};
template
<
typename
CharType
>
template
<
typename
CharType
,
typename
StringType
=
std
::
basic_string
<
CharType
>
>
class
output_adapter
class
output_adapter
{
{
public
:
public
:
...
@@ -4807,7 +4807,7 @@ class output_adapter
...
@@ -4807,7 +4807,7 @@ class output_adapter
output_adapter
(
std
::
basic_ostream
<
CharType
>&
s
)
output_adapter
(
std
::
basic_ostream
<
CharType
>&
s
)
:
oa
(
std
::
make_shared
<
output_stream_adapter
<
CharType
>>
(
s
))
{}
:
oa
(
std
::
make_shared
<
output_stream_adapter
<
CharType
>>
(
s
))
{}
output_adapter
(
std
::
basic_string
<
CharType
>
&
s
)
output_adapter
(
StringType
&
s
)
:
oa
(
std
::
make_shared
<
output_string_adapter
<
CharType
>>
(
s
))
{}
:
oa
(
std
::
make_shared
<
output_string_adapter
<
CharType
>>
(
s
))
{}
operator
output_adapter_t
<
CharType
>
()
operator
output_adapter_t
<
CharType
>
()
...
@@ -11556,7 +11556,7 @@ class basic_json
...
@@ -11556,7 +11556,7 @@ class basic_json
const
bool
ensure_ascii
=
false
)
const
const
bool
ensure_ascii
=
false
)
const
{
{
string_t
result
;
string_t
result
;
serializer
s
(
detail
::
output_adapter
<
char
>
(
result
),
indent_char
);
serializer
s
(
detail
::
output_adapter
<
char
,
string_t
>
(
result
),
indent_char
);
if
(
indent
>=
0
)
if
(
indent
>=
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