Switching ParserCache serialization to JSON frees our hands for modifying ParserCache entries. For Wikimedia sites, we can simply wait for the parser cache to expire before we make structural changes to ParserOutput. However, when 3rd parties updated from an older version of MediaWiki, they will have old serialized data in the cache. Attempting to read such old serialized objects may result in partially initialized and invalid ParserOutput (and CacheTime) instances. We need a self-test method to ensure such instances are safe to use.
We could alternatively simply discard all non-json serialized cache entries, but that would create a cold cache situation, which may lead to a stampede on a busy site.