Today I was going through the JSON tutorials but could not understand most of the things.
So I just copied the code given in the tutorial.Will the further challanges be more difficult if I don’t fully understand JSON right now?
I felt the same way when I first encountered JSON. You’ll get the hang of it with practice. I recommend that you watch some video tutorials on YouTube, or look up some info elsewhere(e.g. MDN). The projects will definitely get rougher, but then again JSON is actually not that difficult as it may seem at first.
Thanks @N4thyra for the suggestions.yes I’ll have to check out youtube for some more examples.
Stab in the dark, but I’d guess it’s not JSON that’s the issue: JSON itself is incredibly simple, it’s just a way to write a text file that’s easy for both a human and a computer to read. I assume fetching resources from servers is the issue, primarily making HTTP requests
I’d watch some videos, you ideally want something that goes through building a few things step-by-step, with reasoning, but re AJAX and the XMLHTTPRequest API:
jQuery’s $.ajax function, which wraps the above in something much easier to use:
getJson is just a wrapper around that ajax function, simplifying it so that it’s set to a get request, assumes JSON is the thing youre getting, and so automatically converts the response from JSON to JS.
And the standard going forward,
fetch, the simpler replacement for the XMLHTTPRequest API described above: