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
699e0a92
Commit
699e0a92
authored
Feb 26, 2020
by
dota17
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo in examples
parent
0feea616
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
11 additions
and
12 deletions
+11
-12
doc/examples/at__object_t_key_type_const.cpp
doc/examples/at__object_t_key_type_const.cpp
+1
-1
doc/examples/begin.cpp
doc/examples/begin.cpp
+1
-1
doc/examples/cbegin.cpp
doc/examples/cbegin.cpp
+1
-1
doc/examples/cend.cpp
doc/examples/cend.cpp
+1
-1
doc/examples/contains_json_pointer.cpp
doc/examples/contains_json_pointer.cpp
+0
-1
doc/examples/count.cpp
doc/examples/count.cpp
+1
-1
doc/examples/end.cpp
doc/examples/end.cpp
+1
-1
doc/examples/erase__IteratorType.cpp
doc/examples/erase__IteratorType.cpp
+1
-1
doc/examples/erase__IteratorType_IteratorType.cpp
doc/examples/erase__IteratorType_IteratorType.cpp
+1
-1
doc/examples/erase__key_type.cpp
doc/examples/erase__key_type.cpp
+1
-1
doc/examples/erase__size_type.cpp
doc/examples/erase__size_type.cpp
+1
-1
doc/examples/operatorarray__size_type_const.cpp
doc/examples/operatorarray__size_type_const.cpp
+1
-1
No files found.
doc/examples/at__object_t_key_type_const.cpp
View file @
699e0a92
...
...
@@ -6,7 +6,7 @@ using json = nlohmann::json;
int
main
()
{
// create JSON object
json
object
=
const
json
object
=
{
{
"the good"
,
"il buono"
},
{
"the bad"
,
"il cattivo"
},
...
...
doc/examples/begin.cpp
View file @
699e0a92
...
...
@@ -8,7 +8,7 @@ int main()
// create an array value
json
array
=
{
1
,
2
,
3
,
4
,
5
};
// get a
m
iterator to the first element
// get a
n
iterator to the first element
json
::
iterator
it
=
array
.
begin
();
// serialize the element that the iterator points to
...
...
doc/examples/cbegin.cpp
View file @
699e0a92
...
...
@@ -8,7 +8,7 @@ int main()
// create an array value
const
json
array
=
{
1
,
2
,
3
,
4
,
5
};
// get a
m
iterator to the first element
// get a
n
iterator to the first element
json
::
const_iterator
it
=
array
.
cbegin
();
// serialize the element that the iterator points to
...
...
doc/examples/cend.cpp
View file @
699e0a92
...
...
@@ -8,7 +8,7 @@ int main()
// create an array value
json
array
=
{
1
,
2
,
3
,
4
,
5
};
// get a
m
iterator to one past the last element
// get a
n
iterator to one past the last element
json
::
const_iterator
it
=
array
.
cend
();
// decrement the iterator to point to the last element
...
...
doc/examples/contains_json_pointer.cpp
View file @
699e0a92
...
...
@@ -14,7 +14,6 @@ int main()
std
::
cout
<<
std
::
boolalpha
<<
j
.
contains
(
"/number"
_json_pointer
)
<<
'\n'
<<
j
.
contains
(
"/string"
_json_pointer
)
<<
'\n'
<<
j
.
contains
(
"/string"
_json_pointer
)
<<
'\n'
<<
j
.
contains
(
"/array"
_json_pointer
)
<<
'\n'
<<
j
.
contains
(
"/array/1"
_json_pointer
)
<<
'\n'
<<
j
.
contains
(
"/array/-"
_json_pointer
)
<<
'\n'
...
...
doc/examples/count.cpp
View file @
699e0a92
...
...
@@ -8,7 +8,7 @@ int main()
// create a JSON object
json
j_object
=
{{
"one"
,
1
},
{
"two"
,
2
}};
// call
find
// call
count()
auto
count_two
=
j_object
.
count
(
"two"
);
auto
count_three
=
j_object
.
count
(
"three"
);
...
...
doc/examples/end.cpp
View file @
699e0a92
...
...
@@ -8,7 +8,7 @@ int main()
// create an array value
json
array
=
{
1
,
2
,
3
,
4
,
5
};
// get a
m
iterator to one past the last element
// get a
n
iterator to one past the last element
json
::
iterator
it
=
array
.
end
();
// decrement the iterator to point to the last element
...
...
doc/examples/erase__IteratorType.cpp
View file @
699e0a92
...
...
@@ -13,7 +13,7 @@ int main()
json
j_array
=
{
1
,
2
,
4
,
8
,
16
};
json
j_string
=
"Hello, world"
;
// call erase
// call erase
()
j_boolean
.
erase
(
j_boolean
.
begin
());
j_number_integer
.
erase
(
j_number_integer
.
begin
());
j_number_float
.
erase
(
j_number_float
.
begin
());
...
...
doc/examples/erase__IteratorType_IteratorType.cpp
View file @
699e0a92
...
...
@@ -13,7 +13,7 @@ int main()
json
j_array
=
{
1
,
2
,
4
,
8
,
16
};
json
j_string
=
"Hello, world"
;
// call erase
// call erase
()
j_boolean
.
erase
(
j_boolean
.
begin
(),
j_boolean
.
end
());
j_number_integer
.
erase
(
j_number_integer
.
begin
(),
j_number_integer
.
end
());
j_number_float
.
erase
(
j_number_float
.
begin
(),
j_number_float
.
end
());
...
...
doc/examples/erase__key_type.cpp
View file @
699e0a92
...
...
@@ -8,7 +8,7 @@ int main()
// create a JSON object
json
j_object
=
{{
"one"
,
1
},
{
"two"
,
2
}};
// call erase
// call erase
()
auto
count_one
=
j_object
.
erase
(
"one"
);
auto
count_three
=
j_object
.
erase
(
"three"
);
...
...
doc/examples/erase__size_type.cpp
View file @
699e0a92
...
...
@@ -8,7 +8,7 @@ int main()
// create a JSON array
json
j_array
=
{
0
,
1
,
2
,
3
,
4
,
5
};
// call erase
// call erase
()
j_array
.
erase
(
2
);
// print values
...
...
doc/examples/operatorarray__size_type_const.cpp
View file @
699e0a92
...
...
@@ -6,7 +6,7 @@ using json = nlohmann::json;
int
main
()
{
// create JSON array
json
array
=
{
"first"
,
"2nd"
,
"third"
,
"fourth"
};
const
json
array
=
{
"first"
,
"2nd"
,
"third"
,
"fourth"
};
// output element at index 2 (third element)
std
::
cout
<<
array
.
at
(
2
)
<<
'\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