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
56a6dec0
Unverified
Commit
56a6dec0
authored
Feb 07, 2021
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔀
merge develop branch
parent
4917e7c2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
parser.hpp
include/nlohmann/detail/input/parser.hpp
+17
-17
json.hpp
single_include/nlohmann/json.hpp
+0
-0
No files found.
include/nlohmann/detail/input/parser.hpp
View file @
56a6dec0
...
...
@@ -389,15 +389,15 @@ class parser
// states.back() is false -> object
// comma -> next value
if
(
get_token
()
==
token_type
::
value_separator
)
// comma -> next value
if
(
get_token
()
==
token_type
::
value_separator
)
{
// parse key
if
(
JSON_HEDLEY_UNLIKELY
(
get_token
()
!=
token_type
::
value_string
))
{
// parse key
if
(
JSON_HEDLEY_UNLIKELY
(
get_token
()
!=
token_type
::
value_string
))
{
return
sax
->
parse_error
(
m_lexer
.
get_position
(),
m_lexer
.
get_token_string
(),
parse_error
::
create
(
101
,
m_lexer
.
get_position
(),
exception_message
(
token_type
::
value_string
,
"object key"
),
BasicJsonType
()));
return
sax
->
parse_error
(
m_lexer
.
get_position
(),
m_lexer
.
get_token_string
(),
parse_error
::
create
(
101
,
m_lexer
.
get_position
(),
exception_message
(
token_type
::
value_string
,
"object key"
),
BasicJsonType
()));
}
if
(
JSON_HEDLEY_UNLIKELY
(
!
sax
->
key
(
m_lexer
.
get_string
())))
...
...
@@ -405,12 +405,12 @@ class parser
return
false
;
}
// parse separator (:)
if
(
JSON_HEDLEY_UNLIKELY
(
get_token
()
!=
token_type
::
name_separator
))
{
return
sax
->
parse_error
(
m_lexer
.
get_position
(),
m_lexer
.
get_token_string
(),
parse_error
::
create
(
101
,
m_lexer
.
get_position
(),
exception_message
(
token_type
::
name_separator
,
"object separator"
),
BasicJsonType
()));
// parse separator (:)
if
(
JSON_HEDLEY_UNLIKELY
(
get_token
()
!=
token_type
::
name_separator
))
{
return
sax
->
parse_error
(
m_lexer
.
get_position
(),
m_lexer
.
get_token_string
(),
parse_error
::
create
(
101
,
m_lexer
.
get_position
(),
exception_message
(
token_type
::
name_separator
,
"object separator"
),
BasicJsonType
()));
}
// parse values
...
...
@@ -436,9 +436,9 @@ class parser
continue
;
}
return
sax
->
parse_error
(
m_lexer
.
get_position
(),
m_lexer
.
get_token_string
(),
parse_error
::
create
(
101
,
m_lexer
.
get_position
(),
exception_message
(
token_type
::
end_object
,
"object"
),
BasicJsonType
()));
return
sax
->
parse_error
(
m_lexer
.
get_position
(),
m_lexer
.
get_token_string
(),
parse_error
::
create
(
101
,
m_lexer
.
get_position
(),
exception_message
(
token_type
::
end_object
,
"object"
),
BasicJsonType
()));
}
}
...
...
single_include/nlohmann/json.hpp
View file @
56a6dec0
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