I'm looking for the most up-to-date way to serialize an array of data in Javascript (w/ or w/o jQuery). Using the latest version of the Chrome browser (June 2013).
Simple associative array, PHP using serialize().
array('product_id' => "145549", "field" => "price")
-- serializes to --
a:2:{s:10:"product_id";s:6:"145549";s:5:"field";s:5:"price";}
If there's no easy way to produce the same serialized string using Javascript, is there an equivalent to PHP's json_encode()?