JSON

JavaScript Object Notation === JSON

Link to validate JSON:   JSONLint

JSON is the standard way to manipulate and transfer data.

Here is a 30 minute video that teach the basics of JSON & AJAX: Link  –  Video

Using Handlebars.js : Video

For an extensive list of API from MDN: Link

myjson.com: Link

Create your own JSON files and hosted in the net, jsonblob.com : Link

. . . . . . . . . . . . . . .

Basic NPM Server

This server looks for changes and auto restart when changes are done similar to the Web-Pack Auto-Reload

After installation, to used, in the terminal type: ” nodemon  <file-name> ”

. . . . . . . . . . . . . . .

JSON

——————————————————————

Example: Js-Object  –> JSON  –>  Js-Object

Using an Object and Posting information in DOM.

Results of previous code on ” index.html ” :

——————————————————————

Here is one a little more fun:

It does the same that the one before but It gets it data from an external file: “data.json”, to make it work make sure that in the Indext.html you have a <div id=”root”>.

here is the configuration of the files:

Here is the code:

Results in the DOM:

 

.



Copyright 2017. All rights reserved.

Posted February 23, 2017 by Edmundo in category "JS