Warning when JSON strings are stored in a cache variable

The cache does not support newlines in the values. Never has. Such values have always needed to be properly handled. I don’t forsee the cache file format being updated to handle them either (it’s yet another short-signed encoding problem of CMake’s past; ;-separated lists being the main one).

Note that the blind replacement you are doing breaks the JSON if there are newlines not already represented by \n in any string content.