morrySnow commented on code in PR #1891:
URL: https://github.com/apache/doris-website/pull/1891#discussion_r1923739920


##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/get-json-double.md:
##########
@@ -24,57 +24,77 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## get_json_double
-### description
-#### Syntax
+## Description
 
-`DOUBLE get_json_double(VARCHAR json_str, VARCHAR json_path)`
+Function is used to extract the value of a field from a JSON document and 
convert it to the DOUBLE type. This function returns the value of the field on 
the specified path, or returns NULL if the value cannot be converted to type 
DOUBLE or the field pointed to by the path does not exist.
 
+## Syntax
 
-Parse and get the floating-point content of the specified path in the JSON 
string.
-Where json_path must start with the $symbol and use. as the path splitter. If 
the path contains..., double quotation marks can be used to surround it.
-Use [] to denote array subscripts, starting at 0.
-The content of path cannot contain ",[and].
-If the json_string format is incorrect, or the json_path format is incorrect, 
or matches cannot be found, NULL is returned.
+```sql
+DOUBLE GET_JSON_DOUBLE( <json_str>, <json_path>)

Review Comment:
   1. 不要返回值类型
   ```suggestion
   GET_JSON_DOUBLE( <json_str>, <json_path>)
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/get-json-string.md:
##########
@@ -24,67 +24,83 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## get_json_string
-### description
-#### Syntax
+## Description
 
-`VARCHAR get_json_string (VARCHAR json str, VARCHAR json path)`
+This function is used to extract a field's value from a JSON document and 
convert it to `STRING` type. It returns the field value at the specified path. 
If the value cannot be converted to a string, or if the field at the specified 
path does not exist, it returns `NULL`.
 
+## Syntax
 
-Parse and retrieve the string content of the specified path in the JSON string.
-Where json_path must start with the $symbol and use. as the path splitter. If 
the path contains..., double quotation marks can be used to surround it.
-Use [] to denote array subscripts, starting at 0.
-The content of path cannot contain ",[and].
-If the json_string format is incorrect, or the json_path format is incorrect, 
or matches cannot be found, NULL is returned.
+` GET_JSON_STRING( <json_str>, <json_path>)`

Review Comment:
   1. 使用 code block 而不是 inline code
   ````suggestion
   ```sql
   GET_JSON_STRING( <json_str>, <json_path>)
   ```
   ````



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-keys.md:
##########
@@ -24,61 +24,89 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## Json_keys
-### Description
-#### Syntax
+## Description
 
-`ARRAY<STRING> json_keys(JSON, [VARCHAR path])`
+Used to return the key from the top-level value of a JSON object. These keys 
are returned as an array or, if path parameters are given, the top-level keys 
of the selected path. You need to provide the JSON document as an argument to 
the function. You can also (optionally) provide a second parameter to specify 
where the "top-level" path in the JSON document starts.
+Where json_doc is a JSON document, and path is an optional parameter used to 
determine where the "top-level" path in the JSON document starts.
 
+## Syntax
 
-Returns the keys from the top-level value of a JSON object as a JSON array, 
or, if a path argument is given, the top-level keys from the selected path. 
Returns NULL if any argument is NULL, the json_doc argument is not an object, 
or path, if given, does not locate an object. An error occurs if the json_doc 
argument is not a valid JSON document or the path argument is not a valid path 
expression
+`JSON_KEYS(<str> [, <path>])`
 
-> Note:
->
-> The result array is empty if the selected object is empty. If the top-level 
value has nested subobjects, the return value does not include keys from those 
subobjects.
-### Example
+## Alias
 
-```sql
+- JSONB_KEYS
+
+## Required Parameters
+| parameters| described|
+|------|------|
+| `<str>`| A JSON string from which to extract the key is needed. |
+
+## Optional Parameters
+
+| parameters| described|
+|------|------|
+| `<path>`| Optional JSON path that specifies the JSON subdocument to be 
checked. If it is not provided, the default is the root document. |
+
+## Return Value
+
+- Returns a list of key names (a JSON array) for the JSON document.
+- Returns NULL if str is not a valid JSON object.

Review Comment:
   ```suggestion
   - Returns NULL if `<str>` is not a valid JSON object.
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-contains.md:
##########
@@ -24,56 +24,103 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## json_contains
-### description
-#### Syntax
+## Description
 
-`BOOLEAN json_contains(JSON json_str, JSON candidate)`
-`BOOLEAN json_contains(JSON json_str, JSON candidate, VARCHAR json_path)`
-`BOOLEAN json_contains(VARCHAR json_str, VARCHAR candidate, VARCHAR json_path)`
+This function is used to check whether a JSON document contains a specified 
JSON element. If the specified element exists in the JSON document, it returns 
1; otherwise, it returns 0. If the JSON document or the queried element is 
invalid, it returns `NULL`.
 
+## Syntax
 
-Indicates by returning 1 or 0 whether a given candidate JSON document is 
contained at a specific path within the json_str JSON document
+`JSON_CONTAINS(<json_str>,  <candidate> [,  <json_path>])`
 
-### example
+## Required Parameters
+
+| Parameter   | Description                                         |
+|-------------|-----------------------------------------------------|
+| `<json_str>` | The JSON string to be checked.                      |
+| `<candidate>` | The JSON element to check for inclusion.            |
+
+## Optional Parameters
+
+| Parameter   | Description                                         |
+|-------------|-----------------------------------------------------|
+| `<json_path>` | An optional JSON path to specify the subdocument to check. 
If not provided, the root document is used by default. |
+
+## Return Value
+- If `json_elem` exists in `json_doc`, it returns 1.

Review Comment:
   这里出现了 json_elem 和 json_doc 这两个新概念。是指的 `<json_str>` 和 `<candidate>` ?



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-contains.md:
##########
@@ -24,56 +24,103 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## json_contains
-### description
-#### Syntax
+## Description
 
-`BOOLEAN json_contains(JSON json_str, JSON candidate)`
-`BOOLEAN json_contains(JSON json_str, JSON candidate, VARCHAR json_path)`
-`BOOLEAN json_contains(VARCHAR json_str, VARCHAR candidate, VARCHAR json_path)`
+This function is used to check whether a JSON document contains a specified 
JSON element. If the specified element exists in the JSON document, it returns 
1; otherwise, it returns 0. If the JSON document or the queried element is 
invalid, it returns `NULL`.
 
+## Syntax
 
-Indicates by returning 1 or 0 whether a given candidate JSON document is 
contained at a specific path within the json_str JSON document
+`JSON_CONTAINS(<json_str>,  <candidate> [,  <json_path>])`
 
-### example
+## Required Parameters
+
+| Parameter   | Description                                         |
+|-------------|-----------------------------------------------------|
+| `<json_str>` | The JSON string to be checked.                      |
+| `<candidate>` | The JSON element to check for inclusion.            |
+
+## Optional Parameters
+
+| Parameter   | Description                                         |
+|-------------|-----------------------------------------------------|
+| `<json_path>` | An optional JSON path to specify the subdocument to check. 
If not provided, the root document is used by default. |
+
+## Return Value
+- If `json_elem` exists in `json_doc`, it returns 1.
+- If `json_elem` does not exist in `json_doc`, it returns 0.
+- If any parameter is invalid or the JSON document format is incorrect, it 
returns `NULL`.
+
+## Examples
+
+```sql
+
+SET @j = '{"a": 1, "b": 2, "c": {"d": 4}}';

Review Comment:
   例子中最好不要使用变量,前后的例子最好不要有依赖关系



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-keys.md:
##########
@@ -24,61 +24,89 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## Json_keys
-### Description
-#### Syntax
+## Description
 
-`ARRAY<STRING> json_keys(JSON, [VARCHAR path])`
+Used to return the key from the top-level value of a JSON object. These keys 
are returned as an array or, if path parameters are given, the top-level keys 
of the selected path. You need to provide the JSON document as an argument to 
the function. You can also (optionally) provide a second parameter to specify 
where the "top-level" path in the JSON document starts.
+Where json_doc is a JSON document, and path is an optional parameter used to 
determine where the "top-level" path in the JSON document starts.
 
+## Syntax
 
-Returns the keys from the top-level value of a JSON object as a JSON array, 
or, if a path argument is given, the top-level keys from the selected path. 
Returns NULL if any argument is NULL, the json_doc argument is not an object, 
or path, if given, does not locate an object. An error occurs if the json_doc 
argument is not a valid JSON document or the path argument is not a valid path 
expression
+`JSON_KEYS(<str> [, <path>])`
 
-> Note:
->
-> The result array is empty if the selected object is empty. If the top-level 
value has nested subobjects, the return value does not include keys from those 
subobjects.
-### Example
+## Alias
 
-```sql
+- JSONB_KEYS
+
+## Required Parameters
+| parameters| described|
+|------|------|
+| `<str>`| A JSON string from which to extract the key is needed. |
+
+## Optional Parameters
+
+| parameters| described|
+|------|------|
+| `<path>`| Optional JSON path that specifies the JSON subdocument to be 
checked. If it is not provided, the default is the root document. |
+
+## Return Value
+
+- Returns a list of key names (a JSON array) for the JSON document.

Review Comment:
   这里说的是返回 json array,第三条说的是返回 array。其实我们返回的是 array 还是 json array?



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-parse-notnull-error-to-value.md:
##########
@@ -23,3 +23,45 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+
+## Description
+
+Function to parse JSON strings. If the JSON string format is invalid or a 
parsing error occurs, the function returns the default value specified by the 
user instead of returning an invalid JSON object. The main purpose of this 
function is to provide a default value that can be used to replace invalid 
results in case of parsing errors, ensuring that the query returns a reasonable 
value.
+
+## Syntax
+
+```sql
+JSON_PARSE_NOTNULL_ERROR_TO_VALUE(< str >, <default_value>)
+```
+
+## Alias
+
+- JSONB_PARSE_NOTNULL_ERROR_TO_VALUE
+
+## Required Parameters
+
+| parameters| described|
+|------|------|
+| '<str>' | The JSON string to parse. This parameter should be a valid JSON 
string. If the JSON format is invalid, the function returns default_value. |
+| '<default_value>' | The default value returned when parsing the error. This 
parameter can be of any type and is used to replace invalid JSON-formatted 
data. |

Review Comment:
   ```suggestion
   | `<default_value>` | The default value returned when parsing the error. 
This parameter can be of any type and is used to replace invalid JSON-formatted 
data. |
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-length.md:
##########
@@ -24,45 +24,66 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## json_length
-### description
-#### Syntax
+## Description
+The JSON_LENGTH function returns the length or number of elements of a given 
JSON document. If the JSON document is an array, the number of elements in the 
array is returned; if the JSON document is an object, the number of key-value 
pairs in the object is returned. Returns NULL if the JSON document is empty or 
invalid.
 
-`INT json_length(JSON json_str)`
-`INT json_length(JSON json_str, VARCHAR json_path)`
+## Syntax
+`JSON_LENGTH(JSON <json_str>, <json_path>)`

Review Comment:
   1. 参数不需要类型
   ```suggestion
   `JSON_LENGTH(<json_str>, <json_path>)`
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-parse-nullable-error-to-invalid.md:
##########
@@ -23,3 +23,72 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+
+## Description
+
+The `JSON_PARSE_NULLABLE_ERROR_TO_INVALID` function is used to parse a JSON 
string into a valid JSON object. If the input JSON string is invalid, it will 
return an "invalid JSON" marker (typically `INVALID_JSON`), without throwing an 
error. If the input is `NULL`, it will also return the `INVALID_JSON` marker.
+
+## Syntax
+
+```sql
+JSON_PARSE_NULLABLE_ERROR_TO_INVALID( <str> )
+```
+
+## Alias
+
+- JSONB_PARSE_NULLABLE_ERROR_TO_INVALID
+
+
+## Required Parameters
+
+| Parameter | Description                                             |
+|-----------|---------------------------------------------------------|
+| `<str>`   | The input string in JSON format to be parsed.           |
+
+## Return Value
+
+| Condition                               | Return Value                       
|
+|-----------------------------------------|------------------------------------|
+| If the input string is a valid JSON     | It returns the corresponding JSON 
object. |
+| If the input string is invalid or NULL  | It returns the `INVALID_JSON` 
marker. |
+
+## Examples
+1. Valid JSON string:
+```sql
+SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": 30}');
+```
+```sql
+
++---------------------------------------------------------------+
+| JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": 30}') |
++---------------------------------------------------------------+
+| {"name": "John", "age": 30}                                    |
++---------------------------------------------------------------+
+```
+
+2. Invalid JSON string:
+```sql
+
+SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": }');
+```
+```sql

Review Comment:
   ````suggestion
   ```sql
   SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": }');
   ```
   
   ```sql
   ````



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-contains.md:
##########
@@ -24,56 +24,103 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## json_contains
-### description
-#### Syntax
+## Description
 
-`BOOLEAN json_contains(JSON json_str, JSON candidate)`
-`BOOLEAN json_contains(JSON json_str, JSON candidate, VARCHAR json_path)`
-`BOOLEAN json_contains(VARCHAR json_str, VARCHAR candidate, VARCHAR json_path)`
+This function is used to check whether a JSON document contains a specified 
JSON element. If the specified element exists in the JSON document, it returns 
1; otherwise, it returns 0. If the JSON document or the queried element is 
invalid, it returns `NULL`.
 
+## Syntax
 
-Indicates by returning 1 or 0 whether a given candidate JSON document is 
contained at a specific path within the json_str JSON document
+`JSON_CONTAINS(<json_str>,  <candidate> [,  <json_path>])`
 
-### example
+## Required Parameters
+
+| Parameter   | Description                                         |
+|-------------|-----------------------------------------------------|
+| `<json_str>` | The JSON string to be checked.                      |
+| `<candidate>` | The JSON element to check for inclusion.            |
+
+## Optional Parameters
+
+| Parameter   | Description                                         |
+|-------------|-----------------------------------------------------|
+| `<json_path>` | An optional JSON path to specify the subdocument to check. 
If not provided, the root document is used by default. |
+
+## Return Value
+- If `json_elem` exists in `json_doc`, it returns 1.
+- If `json_elem` does not exist in `json_doc`, it returns 0.
+- If any parameter is invalid or the JSON document format is incorrect, it 
returns `NULL`.
+
+## Examples
+
+```sql
+
+SET @j = '{"a": 1, "b": 2, "c": {"d": 4}}';
+SET @j2 = '1';
+SELECT JSON_CONTAINS(@j, @j2, '$.a');

Review Comment:
   ```suggestion
   SELECT JSON_CONTAINS('{"a": 1, "b": 2, "c": {"d": 4}}', '1', '$.a');
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-length.md:
##########
@@ -24,45 +24,66 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## json_length
-### description
-#### Syntax
+## Description
+The JSON_LENGTH function returns the length or number of elements of a given 
JSON document. If the JSON document is an array, the number of elements in the 
array is returned; if the JSON document is an object, the number of key-value 
pairs in the object is returned. Returns NULL if the JSON document is empty or 
invalid.
 
-`INT json_length(JSON json_str)`
-`INT json_length(JSON json_str, VARCHAR json_path)`
+## Syntax
+`JSON_LENGTH(JSON <json_str>, <json_path>)`
 
-If specified path, the JSON_LENGTH() function returns the length of the data 
matching the path in the JSON document, otherwise it returns the length of the 
JSON document. The function calculates the length of the JSON document 
according to the following rules:
+## Required Parameters
 
-* The length of a scalar is 1. For example, the length of 1, '"x"', true, 
false, null is all 1.
-* The length of an array is the number of array elements. For example, the 
length of [1, 2] is 2.
-* The length of an object is the number of object members. For example, the 
length of {"x": 1} is 1.
+| parameters| described|
+|------|------|
+| `<json_str>`| The length of the JSON string needs to be checked. |
 
-### example
+## Optional Parameters
+| parameters| described|
+|------|------|
+| `<rhs>`| If a path is specified, the JSON_LENGTH() function returns the 
length of the data that matches the path in the JSON document, otherwise it 
returns the length of the JSON document|

Review Comment:
   语法中没有`<rhs>`



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-type.md:
##########
@@ -40,17 +38,72 @@ It is used to determine the type of the field specified by 
json_path in JSON dat
 - double
 - string
 
-#### Syntax
+## Syntax
 
 ```sql
-STRING json_type(JSON j, VARCHAR json_path)
+STRING JSON_TYPE( <JSON j> )

Review Comment:
   ```suggestion
   STRING JSON_TYPE( <json> )
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/string-functions/ucase.md:
##########
@@ -24,14 +24,37 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## ucase
-### description
-#### Syntax
+## Description
 
-`VARCHAR ucase(VARCHAR str)`
+Used to convert a string to uppercase letters
+## Alias
 
+- upper

Review Comment:
   ```suggestion
   - UPPER
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-valid.md:
##########
@@ -24,52 +24,60 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-## json_valid
-### description
+## Description
 
-json_valid functions returns 0 or 1 to indicate whether a value is valid JSON 
and Returns NULL if the argument is NULL.
+The JSON_VALID function returns 0 or 1 to indicate whether the input is a 
valid JSON. If the input is NULL, it returns NULL.
 
-#### Syntax
+## Syntax
 
-`JSONB json_valid(VARCHAR json_str)`
+```sql
+JSONB JSON_VALID( <str> )

Review Comment:
   ```suggestion
   JSON_VALID( <str> )
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-parse-nullable-error-to-invalid.md:
##########
@@ -23,3 +23,72 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+
+## Description
+
+The `JSON_PARSE_NULLABLE_ERROR_TO_INVALID` function is used to parse a JSON 
string into a valid JSON object. If the input JSON string is invalid, it will 
return an "invalid JSON" marker (typically `INVALID_JSON`), without throwing an 
error. If the input is `NULL`, it will also return the `INVALID_JSON` marker.
+
+## Syntax
+
+```sql
+JSON_PARSE_NULLABLE_ERROR_TO_INVALID( <str> )
+```
+
+## Alias
+
+- JSONB_PARSE_NULLABLE_ERROR_TO_INVALID
+
+
+## Required Parameters
+
+| Parameter | Description                                             |
+|-----------|---------------------------------------------------------|
+| `<str>`   | The input string in JSON format to be parsed.           |
+
+## Return Value
+
+| Condition                               | Return Value                       
|
+|-----------------------------------------|------------------------------------|
+| If the input string is a valid JSON     | It returns the corresponding JSON 
object. |
+| If the input string is invalid or NULL  | It returns the `INVALID_JSON` 
marker. |
+
+## Examples
+1. Valid JSON string:
+```sql
+SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": 30}');
+```
+```sql
+
++---------------------------------------------------------------+
+| JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": 30}') |
++---------------------------------------------------------------+
+| {"name": "John", "age": 30}                                    |
++---------------------------------------------------------------+
+```
+
+2. Invalid JSON string:
+```sql
+
+SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": }');
+```
+```sql
+
++---------------------------------------------------------------+
+| JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": }') |
++---------------------------------------------------------------+
+| INVALID_JSON                                                  |
++---------------------------------------------------------------+
+```
+3. Input is NULL:
+```sql
+
+SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID(NULL);
+```
+

Review Comment:
   ````suggestion
   
   ```sql
   SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID(NULL);
   ```
   
   ````



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-type.md:
##########
@@ -40,17 +38,72 @@ It is used to determine the type of the field specified by 
json_path in JSON dat
 - double
 - string
 
-#### Syntax
+## Syntax
 
 ```sql
-STRING json_type(JSON j, VARCHAR json_path)

Review Comment:
   json_path 被去掉了,是其实不支持?



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-parse-nullable-error-to-null.md:
##########
@@ -23,3 +23,76 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+
+## Description
+
+The `JSON_PARSE_NULLABLE_ERROR_TO_NULL` function is used to parse a JSON 
string into a valid JSON object. If the input JSON string is invalid, it will 
return `NULL` without throwing an error. If the input is `NULL`, it will 
directly return `NULL`.
+
+## Syntax
+
+```sql
+JSON_PARSE_NULLABLE_ERROR_TO_NULL( <str> )
+```
+## Aliases
+
+- JSONB_PARSE_NULLABLE_ERROR_TO_NULL
+
+## Required Parameters
+
+| Parameter | Description                                             |
+|-----------|---------------------------------------------------------|
+| `<str>`   | The input string in JSON format to be parsed.           |
+
+## Return Value
+
+If the input string is a valid JSON, it returns the corresponding JSON object.
+If the input string is invalid or NULL, it returns NULL.
+
+## Examples
+
+1. Valid JSON string:
+
+```sql
+SELECT JSON_PARSE_NULLABLE_ERROR_TO_NULL('{"name": "John", "age": 30}');
+

Review Comment:
   这是个比较普遍的问题,code block 中的空行会被展示,所以要消除所有 code block 中不必要的空行



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-type.md:
##########
@@ -40,17 +38,72 @@ It is used to determine the type of the field specified by 
json_path in JSON dat
 - double
 - string
 
-#### Syntax
+## Syntax
 
 ```sql
-STRING json_type(JSON j, VARCHAR json_path)
+STRING JSON_TYPE( <JSON j> )
 ```
 
-### example
+## Alias
+
+- JSONB_TYPE
+
+## Required Parameters
+
+
+| Parameter | Description |
+|------|------|
+| `<JSON j>` | The JSON string to check the type of. |

Review Comment:
   ```suggestion
   | `<json>` | The JSON string to check the type of. |
   ```



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-parse-nullable-error-to-invalid.md:
##########
@@ -23,3 +23,72 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+
+## Description
+
+The `JSON_PARSE_NULLABLE_ERROR_TO_INVALID` function is used to parse a JSON 
string into a valid JSON object. If the input JSON string is invalid, it will 
return an "invalid JSON" marker (typically `INVALID_JSON`), without throwing an 
error. If the input is `NULL`, it will also return the `INVALID_JSON` marker.
+
+## Syntax
+
+```sql
+JSON_PARSE_NULLABLE_ERROR_TO_INVALID( <str> )
+```
+
+## Alias
+
+- JSONB_PARSE_NULLABLE_ERROR_TO_INVALID
+
+
+## Required Parameters
+
+| Parameter | Description                                             |
+|-----------|---------------------------------------------------------|
+| `<str>`   | The input string in JSON format to be parsed.           |
+
+## Return Value
+
+| Condition                               | Return Value                       
|
+|-----------------------------------------|------------------------------------|
+| If the input string is a valid JSON     | It returns the corresponding JSON 
object. |
+| If the input string is invalid or NULL  | It returns the `INVALID_JSON` 
marker. |
+
+## Examples
+1. Valid JSON string:
+```sql
+SELECT JSON_PARSE_NULLABLE_ERROR_TO_INVALID('{"name": "John", "age": 30}');
+```
+```sql
+
++---------------------------------------------------------------+

Review Comment:
   ````suggestion
   ```
   
   ```sql
   +---------------------------------------------------------------+
   ````



##########
docs/sql-manual/sql-functions/scalar-functions/json-functions/json-parse-nullable-error-to-value.md:
##########
@@ -23,3 +23,78 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
+
+## Description
+
+The `JSON_PARSE_NULLABLE_ERROR_TO_VALUE` function is used to parse a JSON 
string into a valid JSON object. If the input JSON string is invalid, it will 
return the default value specified by the user, instead of throwing an error. 
If the input is `NULL`, it will return the default value.
+
+## Syntax
+
+```sql
+JSON_PARSE_NULLABLE_ERROR_TO_VALUE( <str> , <default_value>)
+```
+## Aliases
+- JSONB_PARSE_NULLABLE_ERROR_TO_VALUE
+
+## Required Parameters
+
+| parameters| described|
+|------|------|
+| '<str>' | The input string in JSON format to be parsed. |
+| '<default_value>' | The default value returned when parsing fails. |

Review Comment:
   ```suggestion
   | `<default_value>` | The default value returned when parsing fails. |
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to