How JSON works in a project

Asked

Viewed 152 times

-4

Hello, I’ve been asking many questions, which seem basic, but causes me confusion, so better ask, rs.

I would like to know how the . json file works in a project, what it does.

Thank you!

  • I found this question at Stackoverflow in English that can answer your question: http://stackoverflow.com/questions/383692/what-is-json-and-why-would-i-use-it. Welcome to Stackoverflow, check out the Tour (http://answall.com/tour) and beware of very broad questions.

  • 2

    Actually you’re talking about the file package.json? Or any JSON?

1 answer

1


JSON is a structure similar to XML, notation, which can be recognized through javascript, which basically can contain values, arrays and objects, you can check more information here: What is JSON? What is it for and how it works?

You can read through several ways, here is an example in jQuery:

   $.getJSON('arquivo.json', function(data) {
    //aqui exibe seu retorno no console do navegador
    console.log(data);
    }
  • -1. Justification: JSON is not a language, and is not structured in Javascript.

  • @Onosendai, I agree with you, thank you for informing me of the problem, I corrected, I hope it was clearer.

  • 2

    Substantial improvement, I appreciate the effort.

  • Thank you all! clarified me a lot!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.