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
ba97e9f4
Unverified
Commit
ba97e9f4
authored
Mar 25, 2021
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
update documentation
parent
5ea15c44
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
11 deletions
+30
-11
at.md
doc/mkdocs/docs/api/basic_json/at.md
+9
-2
contains.md
doc/mkdocs/docs/api/basic_json/contains.md
+2
-1
count.md
doc/mkdocs/docs/api/basic_json/count.md
+2
-2
erase.md
doc/mkdocs/docs/api/basic_json/erase.md
+7
-1
find.md
doc/mkdocs/docs/api/basic_json/find.md
+3
-3
operator[].md
doc/mkdocs/docs/api/basic_json/operator[].md
+7
-2
No files found.
doc/mkdocs/docs/api/basic_json/at.md
View file @
ba97e9f4
...
...
@@ -6,8 +6,10 @@ reference at(size_type idx);
const_reference
at
(
size_type
idx
)
const
;
// (2)
reference
at
(
const
typename
object_t
::
key_type
&
key
);
const_reference
at
(
const
typename
object_t
::
key_type
&
key
)
const
;
template
<
typename
KeyT
>
reference
at
(
KeyT
&&
key
);
template
<
typename
KeyT
>
const_reference
at
(
KeyT
&&
key
)
const
;
// (3)
reference
at
(
const
json_pointer
&
ptr
);
...
...
@@ -18,6 +20,11 @@ const_reference at(const json_pointer& ptr) const;
2.
Returns a reference to the element at with specified key
`key`
, with bounds checking.
3.
Returns a reference to the element at with specified JSON pointer
`ptr`
, with bounds checking.
## Template parameters
`KeyT`
: A type convertible to an object key. This can also be a string literal or a string view (C++17).
## Parameters
`idx`
(in)
...
...
doc/mkdocs/docs/api/basic_json/contains.md
View file @
ba97e9f4
...
...
@@ -11,7 +11,8 @@ value is not an object, `#!cpp false` is returned.
## Template parameters
`KeyT`
: A type for an object key other than
`basic_json::json_pointer`
.
: A type for an object key other than
`basic_json::json_pointer`
. This can also be a string literal or a string view
(C++17).
## Parameters
...
...
doc/mkdocs/docs/api/basic_json/count.md
View file @
ba97e9f4
...
...
@@ -2,7 +2,7 @@
```
cpp
template
<
typename
KeyT
>
size_type
count
(
KeyT
&&
key
)
const
;
size_type
count
(
KeyT
&&
key
)
const
;
```
Returns the number of elements with key
`key`
. If
`ObjectType`
is the default
`std::map`
type, the return value will
...
...
@@ -11,7 +11,7 @@ always be `0` (`key` was not found) or `1` (`key` was found).
## Template parameters
`KeyT`
: A type for an object key.
: A type for an object key.
This can also be a string literal or a string view (C++17).
## Parameters
...
...
doc/mkdocs/docs/api/basic_json/erase.md
View file @
ba97e9f4
...
...
@@ -10,7 +10,8 @@ iterator erase(iterator first, iterator last);
const_iterator
erase
(
const_iterator
first
,
const_iterator
last
);
// (3)
size_type
erase
(
const
typename
object_t
::
key_type
&
key
);
template
<
typename
KeyT
>
size_type
erase
(
KeyT
&&
key
);
// (4)
void
erase
(
const
size_type
idx
);
...
...
@@ -31,6 +32,11 @@ void erase(const size_type idx);
4.
Removes an element from a JSON array by index.
## Template parameters
`KeyT`
: A type convertible to an object key. This can also be a string literal or a string view (C++17).
## Parameters
`pos`
(in)
...
...
doc/mkdocs/docs/api/basic_json/find.md
View file @
ba97e9f4
...
...
@@ -2,10 +2,10 @@
```
cpp
template
<
typename
KeyT
>
iterator
find
(
KeyT
&&
key
);
iterator
find
(
KeyT
&&
key
);
template
<
typename
KeyT
>
const_iterator
find
(
KeyT
&&
key
)
const
const_iterator
find
(
KeyT
&&
key
)
const
```
Finds an element in a JSON object with key equivalent to
`key`
. If the element is not found or the JSON value is not an
...
...
@@ -14,7 +14,7 @@ object, `end()` is returned.
## Template parameters
`KeyT`
: A type for an object key.
: A type for an object key.
This can also be a string literal or a string view (C++17).
## Parameters
...
...
doc/mkdocs/docs/api/basic_json/operator[].md
View file @
ba97e9f4
...
...
@@ -6,8 +6,10 @@ reference operator[](size_type idx);
const_reference
operator
[](
size_type
idx
)
const
;
// (2)
reference
operator
[](
const
typename
object_t
::
key_type
&
key
);
const_reference
operator
[](
const
typename
object_t
::
key_type
&
key
)
const
;
template
<
typename
KeyT
>
reference
operator
[](
KeyT
&&
key
);
template
<
typename
KeyT
>
const_reference
operator
[](
KeyT
&&
key
)
const
;
template
<
typename
T
>
reference
operator
[](
T
*
key
);
template
<
typename
T
>
...
...
@@ -24,6 +26,9 @@ const_reference operator[](const json_pointer& ptr) const;
## Template parameters
`KeyT`
: A type convertible to an object key. This can also be a string literal or a string view (C++17).
`T`
: string literal convertible to
`object_t::key_type`
...
...
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