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
43ee70ce
Commit
43ee70ce
authored
Apr 05, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert changes to master
parent
44a8e9bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
20 deletions
+0
-20
src/json.hpp
src/json.hpp
+0
-10
src/json.hpp.re2c
src/json.hpp.re2c
+0
-10
No files found.
src/json.hpp
View file @
43ee70ce
...
...
@@ -2148,7 +2148,6 @@ class basic_json
string_t
dump
(
const
int
indent
=
-
1
)
const
{
std
::
stringstream
ss
;
ss
.
imbue
(
std
::
locale
(
"C"
));
if
(
indent
>=
0
)
{
...
...
@@ -5654,20 +5653,11 @@ class basic_json
const
bool
pretty_print
=
(
o
.
width
()
>
0
);
const
auto
indentation
=
(
pretty_print
?
o
.
width
()
:
0
);
// save locale of o
auto
old_locale
=
o
.
getloc
();
// set locale of o to "C"
o
.
imbue
(
std
::
locale
(
"C"
));
// reset width to 0 for subsequent calls to this stream
o
.
width
(
0
);
// do the actual serialization
j
.
dump
(
o
,
pretty_print
,
static_cast
<
unsigned
int
>
(
indentation
));
// reset locale
o
.
imbue
(
old_locale
);
return
o
;
}
...
...
src/json.hpp.re2c
View file @
43ee70ce
...
...
@@ -2148,7 +2148,6 @@ class basic_json
string_t dump(const int indent = -1) const
{
std::stringstream ss;
ss.imbue(std::locale("C"));
if (indent >= 0)
{
...
...
@@ -5654,20 +5653,11 @@ class basic_json
const bool pretty_print = (o.width() > 0);
const auto indentation = (pretty_print ? o.width() : 0);
// save locale of o
auto old_locale = o.getloc();
// set locale of o to "C"
o.imbue(std::locale("C"));
// reset width to 0 for subsequent calls to this stream
o.width(0);
// do the actual serialization
j.dump(o, pretty_print, static_cast<unsigned int>(indentation));
// reset locale
o.imbue(old_locale);
return o;
}
...
...
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