I have a basic understanding of serialize (I come across it often when I'm migrating WordPress installs) and I just discovered json_encode.
Given that serialize causes so much trouble with replacing strings in the database (eg. editing an optinos field directly), why does WordPress prefer serialize to (the seemingly similar) json_encode, which doesn't insert the string length into the stored value.
My first thought was that it may provide some security or error-checking benefits - WordPress will ignore the option if the string lengths are incorrect.. but I'm interested in a qualified explanation :)
