Store an array in drupal 7 field I have an use-case where a large associative array is getting generated while saving a node. The array is for a specific content type. I want to save the array along with the node.

While saving all the values of an array to different fields is not practical; Should I parse the array and save it as a string to a certain field so that I can get the array back while fetching?

If so, which one would be better : serialize or json_encode.

While I heard serialize is not reliable all the time, json_encode's purpose is not the same what I am going to use.

Briefly, I want to store a dynamic associative array against a node.

Any suggestion?
serialize is better for small array, cuz unserialize will work faster. So if you work with huge data use json_encode &amp;json_decode.
Comparison PHP Serialization vs JSON Encoding for an array  and your question already answered here on stackoverflow you can find more information about your question.