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
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
575 additions
and
385 deletions
+575
-385
include/nlohmann/detail/input/parser.hpp
include/nlohmann/detail/input/parser.hpp
+17
-17
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+558
-368
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 source diff could not be displayed because it is too large. You can
view the blob
instead.
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