mount a json file on client-side or server-side?

0

The .json file I'm developing is entirely being mounted on the client side, is this a good practice? a part of the code:

                array.form[array.form.length - 1].perg.push({
                    numerodaperguntaSemPonto: retiraPonto(numeroDaPergunta[0].value),
                    descricaoQuestao: descricaoQuestao[0].value,
                    notapergunta: questao[0].value,
                    titleSub: [],
                    isObrig: false
                });
    
asked by anonymous 20.08.2015 / 14:15

1 answer

0

It depends,

  • If the file is downloaded by the user: no problem, just be careful: if it is imported, you should do a security check.
  • If JSON is sent to a server, check the server side, it can be very easy to manipulate this data at the time of the request
  • 20.08.2015 / 15:14