A short and sweet intro to MySQL JSON data type
As of MySQL 5.7.8, MySQL supports a native JSON data type defined by RFC 7159 which enables efficient access to data in JSON documents. We can obviously store JSON formatted strings in text type column, but there are some advantages of storing that in JSON data type as below:
- Automatic validation of JSON documents.
- Optimized storage format.
- A set of SQL functions is available known as JSON functions to do operations on
JSON
values such as creation, manipulation, and searching. So that you don’t have to pull downJSON
content at application side to do all of this. - A set of spatial functions for operating on GeoJSON values is also available.
- Normalization, Merging, and Auto-wrapping of
JSON
Values.
All of the above points can be referred in the detail here!