Reputation: 9
My question is how to store a nested JSON as key value in mysql table. Earlier I thought of storing it as CSV but on deep diving I found it like it would be difficult to query those values and to manage as well. Please help me in giving alternate solutions of how and where to store JSON.
The version of MySQL I am using does not support the JSON data type
Upvotes: 0
Views: 2687
Reputation: 10372
Since MySQL 5.7 a native JSON data type is supported.
See also https://dev.mysql.com/doc/refman/5.7/en/json.html
If your MySQL version is lower the only option left is to store it as text. Otherwise you will not be able to store it in a simple key value pair manner.
Upvotes: 1