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
4d00105e
Commit
4d00105e
authored
Jan 04, 2015
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidy up
parent
0019c85b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
README.md
README.md
+11
-5
JSON.cc
src/JSON.cc
+0
-1
No files found.
README.md
View file @
4d00105e
# JSON for Modern C++
# JSON for Modern C++
*What if JSON was part
y
of modern C++?*
*What if JSON was part of modern C++?*
[

](https://travis-ci.org/nlohmann/json)
[

](https://travis-ci.org/nlohmann/json)
[

](https://coveralls.io/r/nlohmann/json)
[

](https://coveralls.io/r/nlohmann/json)
...
@@ -166,6 +166,9 @@ j.empty(); // false
...
@@ -166,6 +166,9 @@ j.empty(); // false
j
.
type
();
// JSON::value_type::array
j
.
type
();
// JSON::value_type::array
j
.
clear
();
// the array is empty again
j
.
clear
();
// the array is empty again
// comparison
j
==
"[
\"
foo
\"
, 1, true]"
_json
;
// true
// create an object
// create an object
JSON
o
;
JSON
o
;
o
[
"foo"
]
=
23
;
o
[
"foo"
]
=
23
;
...
@@ -235,15 +238,18 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
...
@@ -235,15 +238,18 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
To compile the unit tests, you need to execute
To compile the unit tests, you need to execute
```
sh
```
sh
autoreconf
-i
$
autoreconf
-i
./configure
$
./configure
make
$
make
```
```
The unit tests can then be executed with
The unit tests can then be executed with
```
sh
```
sh
./json_unit
$
./json_unit
===============================================================================
All tests passed
(
863 assertions
in
10
test
cases
)
```
```
For more information, have a look at the file
[
.travis.yml
](
https://github.com/nlohmann/json/blob/master/.travis.yml
)
.
For more information, have a look at the file
[
.travis.yml
](
https://github.com/nlohmann/json/blob/master/.travis.yml
)
.
src/JSON.cc
View file @
4d00105e
...
@@ -1832,7 +1832,6 @@ JSON JSON::Parser::parse()
...
@@ -1832,7 +1832,6 @@ JSON JSON::Parser::parse()
// process nonempty array
// process nonempty array
if
(
_current
!=
']'
)
if
(
_current
!=
']'
)
{
{
size_t
element_count
=
0
;
do
do
{
{
result
.
push_back
(
parse
());
result
.
push_back
(
parse
());
...
...
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