From ec9db1b0ecbaa565ea0abba38435892035b4d672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=20V=C3=AEjdea?= Date: Wed, 20 Oct 2021 17:46:00 +0300 Subject: [PATCH 1/2] Fix typos in operator[] documentation --- doc/mkdocs/docs/api/basic_json/operator[].md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/mkdocs/docs/api/basic_json/operator[].md b/doc/mkdocs/docs/api/basic_json/operator[].md index 4b36f1a913..d3dddf42c0 100644 --- a/doc/mkdocs/docs/api/basic_json/operator[].md +++ b/doc/mkdocs/docs/api/basic_json/operator[].md @@ -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'. From 0721b3218440e7586f9383a1cdfadde5c916014f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=20V=C3=AEjdea?= Date: Wed, 20 Oct 2021 18:36:11 +0300 Subject: [PATCH 2/2] Fix additional typo --- doc/mkdocs/docs/api/basic_json/operator[].md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mkdocs/docs/api/basic_json/operator[].md b/doc/mkdocs/docs/api/basic_json/operator[].md index d3dddf42c0..f138eaca7a 100644 --- a/doc/mkdocs/docs/api/basic_json/operator[].md +++ b/doc/mkdocs/docs/api/basic_json/operator[].md @@ -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