adrianmak Posted July 24, 2016 Share Posted July 24, 2016 isn't it just treat it as plain text string, and the db field declare as, let say varchar type Link to comment Share on other sites More sharing options...
kongondo Posted July 24, 2016 Share Posted July 24, 2016 Yes...Devs tend to use VARCHAR or Blob. I use VARCHAR. Note that as of MySQL 5.7, there is a native JSON data type. Here's some articles/references about the data type + advice on when/if you should use it. https://dev.mysql.com/doc/refman/5.7/en/json.html http://lornajane.net/posts/2016/mysql-5-7-json-features https://www.sitepoint.com/use-json-data-fields-mysql-databases/ http://stackoverflow.com/questions/5544749/what-column-type-should-be-used-to-store-serialized-data-in-a-mysql-db http://stackoverflow.com/questions/33660866/native-json-support-in-mysql-5-7-what-is-the-pros-and-cons-of-json-data-type https://benjaminlistwon.com/working-with-json-data-in-mysql-part-1-of-3 6 Link to comment Share on other sites More sharing options...
DaveP Posted July 25, 2016 Share Posted July 25, 2016 I use text fields for eg Stripe responses. The only thing to watch is that PW puts a default size on text fields which may not be long enough, and will truncate data silently. 1 Link to comment Share on other sites More sharing options...
Recommended Posts