-
Bug
-
Resolution: Obsolete
-
Minor
-
None
-
False
-
-
False
-
Moderate
Mariadb stores JSON as LONGTEXT, not JSON. So, when you have a JSON column in mariadb, it just comes out with a string in the schema, rather than io.debezium.data.Json
{
"name": "json_col",
"type": ["null","string"],
"default": null
}
Here's a blog post from Mariadb on the topic
Making MariaDB understand MySQL JSON - MariaDB.org
And from their docs;:
JSON is an alias for LONGTEXT. See JSON Data Type for details.
In MySQL, JSON is an object and is compared according to json values. In MariaDB JSON strings are normal strings and compared as strings. One exception is when using JSON_EXTRACT() in which case strings are unescaped before comparison.
So, Its really just a LONGTEXT.
I think that all that could probably be done is change the docs Debezium connector for MariaDB :: Debezium Documentation to say that JSON is actually LONGTEXT and will output as string, and wont have io.debezium.data.Json