Wednesday, 15 July 2020

Introduction to JSON

JSON (JavaScript Object Notation) is:
  • lightweight data-interchange format
  • open standard file format
  • easy for humans to read and write
  • easy for machines to parse and generate
  • uses human-readable text to store and transmit data objects



Arrays


Valid JSON: array of objects:

[
   {
"a": 1
   }, 
   {
"b": 2
   }
]

Valid JSON: array of arrays where each array has a single element:

[
[
  {
"a": {}
}
 ],
[
  {
"b": {}
}
 ]
]


How to represent an array of integers?


JSON for List of int

{
    "Id": "610",
    "Name": "15",
    "Description": "1.99",
    "ItemModList": [
                       0,
                       375,
                       668,
                       5,
                       6
                   ]
}



JSON (object) vs JSON string



JSON object is an instance of the data type (e.g. Object in JavaScript) which represents a JSON (structure) and which can be initialised with a JSON literal:

var jsonObject = { "prop": "val" };

JSON string is a string:

var jsonString = '{ "prop": "val" }';

JavaScript provides methods for converting JSON Object to string:

JSON.stringify to convert objects into JSON string.
JSON.parse to convert JSON string back into an object.


1 comment:

Jason williams said...

Are you interested in any kinds of hacking services?
Feel free to contact TECHNECHHACKS.

For years now we’ve helped so many organizations and companies in hacking services.
TECHNECHHACKS is a team of certified hackers that has their own specialty and they are five star rated hackers.

We give out jobs to hackers (gurus only) to those willing to work, with or without a degree, to speed up the availability of time given to jobs!!

Thus an online binary decoding exam will be set for those who needs employment under the teams establishment.


we deal with the total functioning of sites like,


• SOCIAL MEDIA (Facebook, Twitter, Instagram, Snapchat, google hangout etc.)

• SCHOOL GRADES

• IOS/OS

• CREDIT SCORES

• BANK ACCOUNTS

• SPOUSES PHONE

Our special agents are five star rated agents that specializes in the following, and will specially be assigned to you for a special job well DONE.

• WESTERN UNION TRANSFER

• CREDIT CARDS INSTALLATION

• MONEY FLIPPING

• CRIMINAL RECORDS

• BTC RECOVERY

• BTC MINING

• BTC INVESTMENT

Thus bewere of scammers because most persons are been scammed and they ended up getting all solutions to their cyber bullies and attacks by US.

I am Jason williams one of the leading hack agent.

PURPOSE IS TO GET YOUR JOBS DONE AT EXACTLY NEEDED TIME REQUESTED!!!



And our WORK SUCCESS IS 100%!!!



We’re always available for you when you need help.

Contact or write us on:

Technechhacks@gmail.com

SIGNED....!

Jason. W

Technechhacks
2020©️All Right Reserved