Convert the cookie object to its JSON representation to avoid duplicate data