Recently,I'm learning Wordpress,it provide a class WP_QUERY to operate the database. You can insert array or object to the database.I feel it is amazing,so I go to see how to achieve it.Maybe,some ideas you can get from it.The main function is: apply_filters.
apply_filters( $tag, $value, $key);
you can ignore the first parameter ,treat the second parameter as array,what the function do is sanitizing the array into string.
after inserting into the database,you can see this :
key s:12:"focal_length";s:3:"190";s:3:"iso";s:3:"400";s:13:"shutter_speed";s:6:"0.0004";s:5:"title";s:0:"";}}