When I looked at local storage when visiting youtube, I found some really weird looking json.
{
creation: 1638112285935,
data: "{\"quality\":1080,\"previousQuality\":360}",
expiration: 1669216285935,
}
Why are there json inside of a string inside json? What is the reasoning behind storing it like this? Am I missing something?
Thanks a lot!
Im not sure but its possibly beacause this data is stored on mysql. in mysql you cant store data as type "json". so to store json in mysql you need to set the datatype "TEXT" and do a JSON.stringify() on the json before storing it in mysql. I hope my answer is clear I have poor English