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
26074581
Commit
26074581
authored
Oct 02, 2015
by
Dario Menendez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed typos in comments for examples
parent
0a813539
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
get__PointerType.cpp
doc/examples/get__PointerType.cpp
+1
-1
get_ptr.cpp
doc/examples/get_ptr.cpp
+1
-1
object.cpp
doc/examples/object.cpp
+2
-2
No files found.
doc/examples/get__PointerType.cpp
View file @
26074581
...
@@ -4,7 +4,7 @@ using namespace nlohmann;
...
@@ -4,7 +4,7 @@ using namespace nlohmann;
int
main
()
int
main
()
{
{
// create a JSON
boolean
// create a JSON
number
json
value
=
17
;
json
value
=
17
;
// explicitly getting pointers
// explicitly getting pointers
...
...
doc/examples/get_ptr.cpp
View file @
26074581
...
@@ -4,7 +4,7 @@ using namespace nlohmann;
...
@@ -4,7 +4,7 @@ using namespace nlohmann;
int
main
()
int
main
()
{
{
// create a JSON
boolean
// create a JSON
number
json
value
=
17
;
json
value
=
17
;
// explicitly getting pointers
// explicitly getting pointers
...
...
doc/examples/object.cpp
View file @
26074581
...
@@ -4,13 +4,13 @@ using namespace nlohmann;
...
@@ -4,13 +4,13 @@ using namespace nlohmann;
int
main
()
int
main
()
{
{
// create JSON
array
s
// create JSON
object
s
json
j_no_init_list
=
json
::
object
();
json
j_no_init_list
=
json
::
object
();
json
j_empty_init_list
=
json
::
object
({});
json
j_empty_init_list
=
json
::
object
({});
json
j_list_of_pairs
=
json
::
object
({
{
"one"
,
1
},
{
"two"
,
2
}
});
json
j_list_of_pairs
=
json
::
object
({
{
"one"
,
1
},
{
"two"
,
2
}
});
//json j_invalid_list = json::object({ "one", 1 }); // would throw
//json j_invalid_list = json::object({ "one", 1 }); // would throw
// serialize the JSON
array
s
// serialize the JSON
object
s
std
::
cout
<<
j_no_init_list
<<
'\n'
;
std
::
cout
<<
j_no_init_list
<<
'\n'
;
std
::
cout
<<
j_empty_init_list
<<
'\n'
;
std
::
cout
<<
j_empty_init_list
<<
'\n'
;
std
::
cout
<<
j_list_of_pairs
<<
'\n'
;
std
::
cout
<<
j_list_of_pairs
<<
'\n'
;
...
...
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