Error creating cookie json with jquery

0

I'm trying to create a simple cookie with a value of the key in json, but I'm getting this from the browser (click on the photo):

This is the plugin I'm using

  

Code, follow below:

 $.cookie("gavetaMilagres", '{"sub_key_1":"sub_value_1", "sub_key_2":"sub_value_2"}'); 

I'd like you to stay, for example, like this:

"{\"time\": 15115242344 \"177.42.157.224\": 18881}"

But it looks like this:

%22%7B%5C%22sub_key_1%5C%22%3A%5C%22sub_value_1%5C%22%2C%20%5C%22sub_key_2%5C%22%3A%5C%22sub_value_2%5C%22%7D%22
    
asked by anonymous 24.11.2017 / 20:31

0 answers