Table 12.22 JSON FunctionsJSON函数
-> | JSON_EXTRACT() 。 | ||
---|---|---|---|
->> | JSON_UNQUOTE(JSON_EXTRACT() )。 | ||
JSON_ARRAY() | |||
JSON_ARRAY_APPEND() | |||
JSON_ARRAY_INSERT() | |||
JSON_CONTAINS() | |||
JSON_CONTAINS_PATH() | |||
JSON_DEPTH() | |||
JSON_EXTRACT() | |||
JSON_INSERT() | |||
JSON_KEYS() | |||
JSON_LENGTH() | |||
JSON_MERGE() | JSON_MERGE_PRESERVE() 的同义词 | Yes | |
JSON_MERGE_PATCH() | |||
JSON_MERGE_PRESERVE() | |||
JSON_OBJECT() | |||
JSON_OVERLAPS() | TRUE (1 ),否则返回FALSE (0 ) | 8.0.17 | |
JSON_PRETTY() | |||
JSON_QUOTE() | |||
JSON_REMOVE() | |||
JSON_REPLACE() | |||
JSON_SCHEMA_VALID() | Validate JSON document against JSON schema; returns TRUE/1 if document validates against schema, or FALSE/0 if it does not | 8.0.17 | |
JSON_SCHEMA_VALIDATION_REPORT() | 8.0.17 | ||
JSON_SEARCH() | |||
JSON_SET() | |||
JSON_STORAGE_FREE() | |||
JSON_STORAGE_SIZE() | |||
JSON_TABLE() | |||
JSON_TYPE() | |||
JSON_UNQUOTE() | |||
JSON_VALID() | |||
JSON_VALUE() | VARCHAR(512) 或指定类型返回此值 | 8.0.21 | |
MEMBER OF() | true (1 ),否则返回false (0 ) | 8.0.17 |
MySQL supports two aggregate JSON functions MySQL支持两个聚合JSON函数JSON_ARRAYAGG()
and JSON_OBJECTAGG()
. JSON_ARRAYAGG()
和JSON_OBJECTAGG()
。See Section 12.20, “Aggregate Functions”, for descriptions of these.参见第12.20节,“聚合函数”,了解这些函数的描述。
MySQL also supports “pretty-printing” of JSON values in an easy-to-read format, using the MySQL还支持使用JSON_PRETTY()
function. JSON_pretty()
函数以易于阅读的格式“漂亮地打印”JSON值。You can see how much storage space a given JSON value takes up, and how much space remains for additional storage, using 您可以分别使用JSON_STORAGE_SIZE()
and JSON_STORAGE_FREE()
, respectively. JSON_storage_SIZE()
和JSON_storage_FREE()
来查看给定JSON值占用的存储空间以及剩余的额外存储空间。For complete descriptions of these functions, see Section 12.18.8, “JSON Utility Functions”.有关这些函数的完整描述,请参阅第12.18.8节,“JSON实用程序函数”。