Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in operator[] documentation #3102

Merged
merged 2 commits into from
Oct 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/mkdocs/docs/api/basic_json/operator[].md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const_reference operator[](const json_pointer& ptr) const;
: index of the element to access

`key` (in)
: object key of the elements to remove
: object key of the element to access

`ptr` (in)
: JSON pointer to the desired element
Expand All @@ -48,10 +48,10 @@ const_reference operator[](const json_pointer& ptr) const;

1. The function can throw the following exceptions:
- Throws [`type_error.305`](../../home/exceptions.md#jsonexceptiontype_error305) if the JSON value is not an array
or null; in that cases, using the `[]` operator with an index makes no sense.
or null; in that case, using the `[]` operator with an index makes no sense.
2. The function can throw the following exceptions:
- Throws [`type_error.305`](../../home/exceptions.md#jsonexceptiontype_error305) if the JSON value is not an array
or null; in that cases, using the `[]` operator with an index makes no sense.
- Throws [`type_error.305`](../../home/exceptions.md#jsonexceptiontype_error305) if the JSON value is not an object
or null; in that case, using the `[]` operator with a key makes no sense.
3. The function can throw the following exceptions:
- Throws [`parse_error.106`](../../home/exceptions.md#jsonexceptionparse_error106) if an array index in the passed
JSON pointer `ptr` begins with '0'.
Expand Down