Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
Why most people use .json in nodejs projects?

Im working with nodejs for backend. And im asking myself why should I use config.json, data.json etc. Why not to use js object and make deepFreeze to it? Whats the benefits of json?

Like:

const config = {
 serviceName: test,
 port: 4050,
};

const deepFreeze = obj => {
Object.keys(obj).forEach(prop => {
 if (typeof obj[prop] === 'object' && !Object.isFrozen(obj[prop])) 
  deepFreeze(obj[prop]);
});
 return Object.freeze(obj);
};
deepFreeze(config);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

json is a text format for representing arrays and objects easily.

The interest of json is that it is independent of a language.

You can read or write JSON from javascript, but also from other languages.

Moreover, during exchanges between a client and a server, it is easy to use it to transport data.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda