文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

14.17 JSON 函数14.17 JSON Functions

本节中描述的函数对 JSON 值执行操作。有关 JSON 数据类型的讨论以及显示如何使用这些函数的更多示例,请参见 第 13.5 节,“JSON 数据类型”。The functions described in this section perform operations on JSON values. For discussion of the JSON data type and additional examples showing how to use these functions, see Section 13.5, “The JSON Data Type”.

对于接受 JSON 参数的函数,如果参数不是有效的 JSON 值,则会发生错误。以 json_doc 表示的参数将被解析为 JSON;以 val 表示的参数不会被解析。For functions that take a JSON argument, an error occurs if the argument is not a valid JSON value. Arguments parsed as JSON are indicated by json_doc; arguments indicated by val are not parsed.

返回 JSON 值的函数总是会对这些值执行规范化(参见 JSON 值的规范化、合并和自动包装),因此会对其进行排序。排序的具体结果随时可能变化;不要依赖它在各版本之间保持一致。Functions that return JSON values always perform normalization of these values (see Normalization, Merging, and Autowrapping of JSON Values), and thus orders them. The precise outcome of the sort is subject to change at any time; do not rely on it to be consistent between releases.

还提供了一组用于操作 GeoJSON 值的空间函数。请参见 第 14.16.11 节,“空间 GeoJSON 函数”。A set of spatial functions for operating on GeoJSON values is also available. See Section 14.16.11, “Spatial GeoJSON Functions”.