what is JSONAsk Questions

 Posted on 13/07/2018 12:49:46 PM

explain what is json? and  why we use json? 
How to Send,recieve and store Data in Json?

 


Share On: facebook gplus twitter
profile
Asked by Hardi Sananse on 13/07/2018 12:49:46 PM Score: 107 points
Add Comment:
Submit

Comments

1 Answer

0 Corrected Answers
4
Profile
Answered by Shailesh Chaudhary on Jul 27 2018 8:00AM Score: 681 points

What is JSON?

JSON stands for : Javascript Object Notation

Json is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML.

Why we are use json?

With the rise of AJAX-powered sites, it’s becoming more and more important for sites to be able to load data quickly and asynchronously, or in the background without delaying page rendering. Switching up the contents of a certain element within our layouts without requiring a page refresh adds a “wow” factor to our applications, not to mention the added convenience for our users. 

Receiving  data in JSON

var myJSON = '{"name":"John", "age":31, "city":"New York"}';
var myObj = JSON.parse(myJSON);
document.getElementById("demo").innerHTML = myObj.name;

Storing data in json format

myObj = {"name":"John""age":31"city":"New York"};
myJSON = JSON.stringify(myObj);

Comments

Add Comment:

Post Your Answer

  •  
  •  

Existing Members

Sign in to your account
Email Address
Password
...or Join us
Download, Vote, Comment, Publish.
Full Name
Email Address
I have read and agree to the Terms of Service and Privacy Policy
Please subscribe me to the StoodQ newsletters
Guideline to answer a question:

Useful tips to submit your answer
Please read below guidelines before you submit your answer for question.

  • Read and understand question for which you are submitting your answer.
  • Try to avoid grammatical and spell mistake while answering.
  • Do not post any irrelevant information in your answer.
  • Explain your answer with example or any reference link to help who posted question.
  • If you find irrelevant question, please report it to support. Click here to contact support.
  • You agree to the privacy policy and terms of use to submit any contents.

Note: StoodQ is online developers community which helps developer for their difficulty, lets help them with your value contribution.