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
b58a93b8
Commit
b58a93b8
authored
Aug 14, 2015
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged #111
parent
6f2da1a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
0 deletions
+13
-0
README.md
README.md
+1
-0
src/json.hpp
src/json.hpp
+2
-0
src/json.hpp.re2c
src/json.hpp.re2c
+2
-0
test/unit.cpp
test/unit.cpp
+8
-0
No files found.
README.md
View file @
b58a93b8
...
...
@@ -373,6 +373,7 @@ I deeply appreciate the help of the following people.
-
[
易思龙
](
https://github.com/likebeta
)
implemented a conversion from anonymous enums.
-
[
kepkin
](
https://github.com/kepkin
)
patiently pushed forward the support for Microsoft Visual studio.
-
[
gregmarr
](
https://github.com/gregmarr
)
simplified the implementation of reverse iterators.
-
[
Caio Luppi
](
https://github.com/caiovlp
)
fixed a bug in the Unicode handling.
Thanks a lot for helping out!
...
...
src/json.hpp
View file @
b58a93b8
...
...
@@ -4692,6 +4692,8 @@ class basic_json
// print character c as \uxxxx
sprintf
(
&
result
[
pos
+
1
],
"u%04x"
,
int
(
c
));
pos
+=
6
;
// overwrite trailing null character
result
[
pos
]
=
'\\'
;
}
else
{
...
...
src/json.hpp.re2c
View file @
b58a93b8
...
...
@@ -4692,6 +4692,8 @@ class basic_json
// print character c as \uxxxx
sprintf(&result[pos + 1], "u%04x", int(c));
pos += 6;
// overwrite trailing null character
result[pos] = '\\';
}
else
{
...
...
test/unit.cpp
View file @
b58a93b8
...
...
@@ -10194,4 +10194,12 @@ TEST_CASE("regression tests")
// hexadecimal "a"
CHECK
(
j
.
dump
()
==
"{
\"
binary string
\"
:
\"\\
u0000asdf
\\
n
\"
,
\"
int64
\"
:10}"
);
}
SECTION
(
"issue #111 - subsequent unicode chars"
)
{
std
::
string
bytes
{
0x7
,
0x7
};
json
j
;
j
[
"string"
]
=
bytes
;
CHECK
(
j
[
"string"
]
==
"\u0007\u0007"
);
}
}
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