user358352
user358352

Reputation:

What can I do with JSON?

I want to, in brief, find out about what I can do with JSON; whether it is an alternative for JavaScript or what?

Upvotes: 1

Views: 683

Answers (4)

Ashish Agarwal
Ashish Agarwal

Reputation: 6283

JSON (an acronym for JavaScript Object Notation) is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript programming language for representing simple data structures and associative arrays, called objects

JSON is built on two structures:

  • A collection of name/value pairs.
  • An ordered list of values.

For more on JSON

Upvotes: 2

Ben Rowe
Ben Rowe

Reputation: 28721

It's just a data format that converts data structures such as objects & arrays into a string representation. It uses the same format as javascript and is very easy to work with in ajax based applications because of this.

What can you do with json? anything that any other major data format can do. It's just data. What you can do with it is up to you.

Upvotes: 2

Artem Barger
Artem Barger

Reputation: 41232

In a brief JSON is JavaScript Object Notation. Which for example instead of doing:

var obj  = new Object( );
obj.arr  = new Array( );
obj.name =  new String ( "Jhon Doe");

You can do:

var obj = { name: "Jhon Doe", arr: [1,2,3,4]};

So once browser will receive or meet some peace of JSON it would be able to compile it into Javascript object, so you will be able to use itt later in the code and reference to it.

Upvotes: 1

Amber
Amber

Reputation: 527548

JSON is short for JavaScript Object Notation. It is a data format used for passing around data, modeled after the Javascript syntax for object/list literals. It is not a programming language, but rather a data markup language.

Upvotes: 9

Related Questions