Category Archives: JSON

JSON Tutorials

JSON or JavaScript Object Notation is a lightweight text-based open standard designed for human-readable data interchange. The JSON filename extension is .json. This tutorial will help you understand JSON and its use within various programming languages such as PHP, PERL, Python, Ruby, Java, etc. Features JSON is a syntax for storing and exchanging data. JSON… Read More »

Comment in json

You can not place comment in Json file. As JSON has no offical support for comments, but it doesn’t mean you can’t add them in other ways.you can use comment in json file using _comment like in below example:- { “_comment”: “comment text goes here…”, “name”: “Kishor” “email”: “test@test.com”, “mobile_no”:”99999999″ “address”: “testjson” }

JSON Object Creation in JavaScript

Here I will show how to create JSON Object in javascript with example. <!DOCTYPE html> <html> <body> <h2>JSON Object Creation in JavaScript</h2> <p id=”demo”></p> <script> var text = ‘{“name”:”John Johnson”,”street”:”Oslo West 16″,”phone”:”555 1234567″}’; var obj = JSON.parse(text); document.getElementById(“demo”).innerHTML = obj.name + “<br>” + obj.street + “<br>” + obj.phone; </script> </body> </html>

JSON in AJAX

JSON stands for JavaScript Object Notation. It is easy to understand and data exchange is fast than XML. It supports array

jQuery Send Receive JSON Objects from Web Service Methods using AJAX in ASP.Net

To send, receive JSON objects from web services methods using jQuery ajax methods in asp.net open your aspx page and write the following code. <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <script type=”text/javascript” src=”http://code.jquery.com/jquery-1.8.2.js”></script> <script type=”text/javascript”> $(function () { $(‘#btnSend’).click(function () { var product = {Name : ‘Oneplus One’,Price : 22000} $.ajax({ type: “POST”, contentType: “application/json; charset=utf-8”, data: “{product:”… Read More »