I want to store a JSON object in MySQL database(using xampp with mariadb). What should be the data type to store? It gives error if 'json' is used as data type.
2 Answers
Refer this ... this might help!
https://www.sitepoint.com/use-json-data-fields-mysql-databases/
P.S: Postgres have better features to store json data compared to mysql or mariaDB
JSONis a string, it is a format that represents arbitrary data as a string. Therefore you simply use avarcharortexttype in a relational database.