Cookiebot.com is using this format in the cookie named "cookieconsent" to store the website visitor's current cookie consent state. The reason for the used format is to support the Safari browser which still uses the original Netscape cookie specification instead of the newer RFC 6265 standard. The Netscape cookie spec does not allow valid JSON, but the cookie value can easily be converted to valid JSON using regular expressions:
PHP example:
$cookie_value = urldecode("{stamp:'XmooaL03kY1V1nk+nMNSUU96m9RkPyId33vL9wPmiXUvKWPEXQt8xA=='%2Cnecessary:true%2Cpreferences:true%2Cstatistics:false%2Cmarketing:false}");
$valid_php_json = preg_replace('/\s*:\s*([a-zA-Z0-9_]+?)([}\[,])/', ':"$1"$2', preg_replace('/([{\[,])\s*([a-zA-Z0-9_]+?):/', '$1"$2":', str_replace("'", '"',stripslashes($cookie_value))));
C# example:
String CookieValue = HttpUtility.UrlDecode("{stamp:'XmooaL03kY1V1nk+nMNSUU96m9RkPyId33vL9wPmiXUvKWPEXQt8xA=='%2Cnecessary:true%2Cpreferences:true%2Cstatistics:false%2Cmarketing:false}");
String ValidJSONString = Regex.Replace(Regex.Replace(CookieValue.Replace("'", "\""), @"([{\[,])\s*([a-zA-Z0-9_]+?):", "$1\"$2\":"), @"\s*:\s*([a-zA-Z0-9_]+?)([}\[,])", ":\"$1\"$2");
In .NET 3.5 or newer the cookie value can be deserialized directly using the JavaScriptSerializer of System.Web.Script.Serialization:
C# example:
String CookieValue = HttpUtility.UrlDecode("{stamp:'XmooaL03kY1V1nk+nMNSUU96m9RkPyId33vL9wPmiXUvKWPEXQt8xA=='%2Cnecessary:true%2Cpreferences:true%2Cstatistics:false%2Cmarketing:false}");
JavaScriptSerializer CookieConsentSerializer = new JavaScriptSerializer();
dynamic CookieConsent = CookieConsentSerializer.Deserialize<object>(CookieValue);
Visual Basic example:
Dim CookieValue As [String] = HttpUtility.UrlDecode("{stamp:'XmooaL03kY1V1nk+nMNSUU96m9RkPyId33vL9wPmiXUvKWPEXQt8xA=='%2Cnecessary:true%2Cpreferences:true%2Cstatistics:false%2Cmarketing:false}")
Dim CookieConsentSerializer As New JavaScriptSerializer()
Dim CookieConsent As dynamic = CookieConsentSerializer.Deserialize(Of Object)(CookieValue)
Cheers,
Daniel