Home >>Json Tutorial

Json Tutorial

JSON Tutorial for beginners

PHPTPOINT provides deep knowledge of JSON language. This JSON tutorial for beginners not only helps beginners as well as also helpful for professionals. This JSON tutorial will help you to learn JSON fundamentals, examples, syntax, array, object, encode, decode, file, date and date format.

With this JSON tutorial, you can learn with examples and with other technologies such as PHP, Python, jQuery, AJAX and many more, we will also teach you how to convert json to xml, html, csv, php array and vice versa

It stands for the JavaScript Object Notation. It is used to exchanging and storing the data from the web-server. It uses the object notation of JavaScript. JavaScript objects can be change into the JSON and receive its format text into the JavaScript objects.

Advantages of JSON

  1. JSON is Faster : These syntaxes are easy to use. We just have to use only -> as a syntax which provides us an easy parsing of the data and faster execution of the data. It is syntax is small and light weighted that’s the reason that it executes the response in the faster way.
  2. Schema Support : It has broad range of supported browsers and compatibility with operating systems so applications made with the coding of JSON do not require so much effort to make it all browsers compatible. While working, the developer thinks for the different browsers but it provides that functionality.
  3. Server Parsing : JSON from the server side parsing is the important part that developers want if the parsing will be fast on the server side then only the only user can get the fast response of their responses so than in this case server-side parsing is the strong point that indicates us to use the JSON on the server side.
  4. Tool for sharing data : For the sharing data of even any size even audio, video and many more It is the best tool, Because It stores the data in the arrays so data transfer makes easier. Just because of this reason, It is a superior file format for web APIs and for web development.

What is JSON

  • It Stands for JavaScript Object Notation.
  • It is lightweight data-interchange format.
  • Easy to read and write than XML.
  • This is language independent.
  • It also supports array, object, string, number and values.

Example : with this tutorial, we will give you many examples to understand the topic well. JSON file should have save with its extension. Let's see a simple example.

File Name : first_json_program.json

	    {"name":"Neetu", "email":"neetu@gmail.com"},  
	    {"name":"Sonu", "email":"sonu3212@gmail.com"},  
	    {"name":"Abhishek", "email":"abhishek@gmail.com"}  

Features of JSON

  • Simplicity
  • Openness
  • Self Describing
  • Internationalization
  • Extensibility
  • Interoperability


PHP also permit us to encode and decode JSON with the help of json_encode() and json decode functions.

1) json_encode()

2) json_decode()

Json Tutorial Index

Sr.No. Topics
1 JSON Introduction
2 PHP JSON Example
3 Insert JSON data MySQL
4 Getting data from MySQL into JSON using PHP

No Sidebar ads