JavaScript:  JSON flavoured cookies