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

255
Visualizações
Writing html in json file as value of key

I needed to load external file to my app. type of json. I am needed to read html content like this(the html will be the value):

<div style="font-size:16px; color:red; text-align:center; display:flex">
  <h1 style="some-style">some text</h1>
  <p style="some-style">some text</p>
  <p style="some-style">some text</p>
  <p style="some-style">some text</p>
  <footer style="some-style">some copyrights!</footer> 
</div>

from json like this:

{
"email": {
 "subject": "User registered!",
 "html": {here goes the html block}
  }
}

Every-time I am writing html in json is very difficult to writing because the double quotes. How can if fix it and can writing a right html? There is any generator for this or any solution?

I needed to html for the module nodemailer to send email. I want to read from json because the main idea it's to send for my clients the json file and they can to add any changes with the value and adding the json from outside after that ,as a volume via docker build.

about 4 years ago · Juan Pablo Isaza
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