DO YOU NEED A CONTENT WRITER FOR YOUR BUSINESS?

Your One-Stop Solution for All Content Needs! Click here for more!
Json

What is JSON?

Share

JSON or JavaScript Object Notation is nothing but a text-based human-readable data storing and interchange. Douglas Crockford originally specified the this format.
The media for this is application/json and the extension is .json.
This is an easier-to-use alternative of XML.

The below example shown an student object with an array of 3 records:

{"students":[
    {"Name":"Tim", "Age":"25"},
    {"Name":"John", "Age":"30"},
    {"Name":"Jane", "Age":"45"}
]}

Below example you can loop through:

<!DOCTYPE html>
<html>
<body>
<h2>Example</h2>
<p id="demo"></p>
<script>
  var str = '';
  var text = {"students":[{"Name":"Tim", "Age":"25"},{"Name":"John", "Age":"30"},{"Name":"Jane", "Age":"45"}]};
  var obj = text.students;
  for ( var i in obj) {
    str +=obj[i].Name+ ":" + obj[i].Age+"<br>";
  }
  document.getElementById("demo").innerHTML = str;
</script>
</body>
</html>

So why JSON?

For AJAX JSON, is faster and easier.
JSON is quicker for reading and writing.

Namaste UI (Author)

Namaste UI collaborates closely with clients to develop tailored guest posting strategies that align with their unique goals and target audiences. Their commitment to delivering high-quality, niche-specific content ensures that each guest post not only meets but exceeds the expectations of both clients and the hosting platforms. Connect with us on social media for the latest updates on guest posting trends, outreach strategies, and digital marketing tips. For any types of guest posting services, contact us on info[at]namasteui.com.

Published by
Namaste UI (Author)

Recent Posts

Top Questions Asked About Invoice Financing Applications

Are you an owner of a small business who’s trying to come up with ways…

2 days ago

Complete Medical Guide to Blood Sugar Testing and Glucose Control

Introduction When patients bring me their lab reports, the confusion is almost always the same.…

5 days ago

6 Tips to Strategically Remodel Your Home

Are you excited about remodeling your house after a long time? Perhaps if you're planning…

6 days ago

Driving Finding Balance on and off the Mat: How Calm Awareness Supports Everyday

The practice of yoga teaches us to be present, patient and mindful of our decisions.…

7 days ago

7 Things to carry with you on hill station

As we are once again allowed to go outside, nearly everyone is planning to go…

1 week ago

Professional Cleaner Hire Guide for Your Business

How do you find a cleaning company that will take excellent care of your business…

2 weeks ago