JSON_STORAGE_SIZE(json_val)

This function returns the number of bytes used to store the binary
representation of a JSON document. When the argument is a JSON column,
this is the space used to store the JSON document as it was inserted
into the column, prior to any partial updates that may have been
performed on it afterwards. json_val must be a valid JSON document or a
string which can be parsed as one. In the case where it is string, the
function returns the amount of storage space in the JSON binary
representation that is created by parsing the string as JSON and
converting it to binary. It returns NULL if the argument is NULL.

An error results when json_val is not NULL, and is not---or cannot be
successfully parsed as---a JSON document.

URL: https://dev.mysql.com/doc/refman/8.0/en/json-utility-functions.html

