Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

265
Visualizações
Why would you store json as a string inside of json

Screenshot of developer tools

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!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda