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
b820bb3b
Commit
b820bb3b
authored
Oct 29, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a lot of unicode errors (#344)
BOMs currently yield an error.
parent
b03bbe72
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
Makefile
Makefile
+1
-1
json.hpp
src/json.hpp
+0
-0
json.hpp.re2c
src/json.hpp.re2c
+1
-1
unit-testsuites.cpp
test/src/unit-testsuites.cpp
+7
-7
unit-unicode.cpp
test/src/unit-unicode.cpp
+2
-2
No files found.
Makefile
View file @
b820bb3b
...
...
@@ -75,7 +75,7 @@ clang_sanitize: clean
# create scanner with re2c
re2c
:
src/json.hpp.re2c
$(RE2C)
-W
--bit-vectors
--nested-ifs
--no-debug-info
$<
|
$(SED)
'1d'
>
src/json.hpp
$(RE2C)
-W
--
utf-8
--encoding-policy
fail
--
bit-vectors
--nested-ifs
--no-debug-info
$<
|
$(SED)
'1d'
>
src/json.hpp
# pretty printer
pretty
:
...
...
src/json.hpp
View file @
b820bb3b
This diff is collapsed.
Click to expand it.
src/json.hpp.re2c
View file @
b820bb3b
...
...
@@ -7848,7 +7848,7 @@ class basic_json
"\000" { last_token_type = token_type::end_of_input; break; }
// anything else is an error
.
{ last_token_type = token_type::parse_error; break; }
*
{ last_token_type = token_type::parse_error; break; }
*/
}
...
...
test/src/unit-testsuites.cpp
View file @
b820bb3b
...
...
@@ -671,7 +671,7 @@ TEST_CASE("nst's JSONTestSuite")
"test/data/nst_json_testsuite/test_parsing/n_string_1_surrogate_then_escape u1x.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_1_surrogate_then_escape.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_UTF-16_incomplete_surrogate.json"
,
//
"test/data/nst_json_testsuite/test_parsing/n_string_UTF8_surrogate_U+D800.json",
"test/data/nst_json_testsuite/test_parsing/n_string_UTF8_surrogate_U+D800.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_accentuated_char_no_quotes.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_backslash_00.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_escape_x.json"
,
...
...
@@ -684,15 +684,15 @@ TEST_CASE("nst's JSONTestSuite")
"test/data/nst_json_testsuite/test_parsing/n_string_invalid-utf-8-in-escape.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_invalid_backslash_esc.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_invalid_unicode_escape.json"
,
//
"test/data/nst_json_testsuite/test_parsing/n_string_invalid_utf-8.json",
"test/data/nst_json_testsuite/test_parsing/n_string_invalid_utf-8.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_invalid_utf8_after_escape.json"
,
//
"test/data/nst_json_testsuite/test_parsing/n_string_iso_latin_1.json",
"test/data/nst_json_testsuite/test_parsing/n_string_iso_latin_1.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_leading_uescaped_thinspace.json"
,
//
"test/data/nst_json_testsuite/test_parsing/n_string_lone_utf8_continuation_byte.json",
"test/data/nst_json_testsuite/test_parsing/n_string_lone_utf8_continuation_byte.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_no_quotes_with_bad_escape.json"
,
//
"test/data/nst_json_testsuite/test_parsing/n_string_overlong_sequence_2_bytes.json",
//
"test/data/nst_json_testsuite/test_parsing/n_string_overlong_sequence_6_bytes.json",
//
"test/data/nst_json_testsuite/test_parsing/n_string_overlong_sequence_6_bytes_null.json",
"test/data/nst_json_testsuite/test_parsing/n_string_overlong_sequence_2_bytes.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_overlong_sequence_6_bytes.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_overlong_sequence_6_bytes_null.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_single_doublequote.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_single_quote.json"
,
"test/data/nst_json_testsuite/test_parsing/n_string_single_string_no_double_quotes.json"
,
...
...
test/src/unit-unicode.cpp
View file @
b820bb3b
...
...
@@ -159,7 +159,7 @@ TEST_CASE("Unicode", "[hide]")
}
}
}
/*
SECTION("ignore byte-order-mark")
{
// read a file with a UTF-8 BOM
...
...
@@ -167,7 +167,7 @@ TEST_CASE("Unicode", "[hide]")
json j;
CHECK_NOTHROW(j << f);
}
*/
SECTION
(
"error for incomplete/wrong BOM"
)
{
CHECK_THROWS_AS
(
json
::
parse
(
"
\xef\xbb
"
),
std
::
invalid_argument
);
...
...
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