Spread the love

What Is JSON??

Spread the love

JSON??

Java Script Object Notation (JSON):
Apart from SOAP and REST protocol there is one more data exchange  system available. The messaging system is similar to XML. It is based on Javascript Language. The uses key value pairs to catch up and carry data.This is also lightweight.

Advantages of JSON:
1. Lightweight
2. Similar to XML so easy to understand
3. Faster and easier to parse
4. Language independent
5. Only plain text and self describing
6. Supports ajax

Disadvantages of JSON:
1. No end Tag
2. Mostly uses array to implement key value pair


Example of JSON as per w3School:

<!DOCTYPE html>
<html>
<body>
<h2>JSON Object Creation in JavaScript</h2>

<p>
Name: <span id=”jname”></span><br />
Age: <span id=”jage”></span><br />
Address: <span id=”jstreet”></span><br />
Phone: <span id=”jphone”></span><br />
</p>

<script>
var JSONObject= {
“name”:”John Johnson”,
“street”:”Oslo West 555″,
“age”:33,
“phone”:”555 1234567″};
document.getElementById(“jname”).innerHTML=JSONObject.name
document.getElementById(“jage”).innerHTML=JSONObject.age
document.getElementById(“jstreet”).innerHTML=JSONObject.street
document.getElementById(“jphone”).innerHTML=JSONObject.phone
</script>

</body>
</html>

 




Spread the love
READ  What Is WSDL ?
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent Posts

Learn Quickly About DevOps Tools in a Fast and Efficient Manner

Introduction to DevOps tools DevOps tools are a collection of...

How to Collaborate between Development and Operations Team Fast and Effectively

Collaborate between Development and Operations Teams are the key...

Learn How to Use Jacoco Java code Coverage

Introduction to Jacoco Jacoco provides a wide range of coverage(analysis...

EDITOR PICKS


Spread the love