Simple js class that saves a JSON string in a cookie.