JSON : JavaScript Object Notation

AI Dashboard is available on the Web, Apple, Google, and Microsoft, PRO version

What is JSON : JavaScript Object Notation?

Source: https://www.json.com/

What is JSON?

JSON is a lightweight text-based open standard designed for human-readable data. It is the most widely used format for exchanging data on the web. It originates from the JavaScript language and is represented with two primary data structures: ordered lists (recognized as ‘arrays’) and name/value pairs (recognized as ‘objects’).

Why JSON?

The JSON standard is language-independent and its data structures, arrays and objects, are universally recognized. These structures are supported in some way by nearly all modern programming languages and are familiar to nearly all programmers. These qualities make it an ideal format for data interchange on the web.

JSON vs XML

The XML specification does not match the data model for most programming languages which makes it slow and tedious for programmers to parse. Compared to JSON, XML has a low data-to-markup ratio which results in it being more difficult for humans to read and write.

JSON Data Types

  • Number{ “myNum”: 123.456 }
    A series of numbers; decimals ok; double-precision floating-point format.
  • String{ “myString”: “abcdef” }
    A series of characters (letters, numbers, or symbols); double-quoted UTF-8 with backslash escaping.
  • Boolean{ “myBool”: true }
    True or false.
  • Array{ “myArray”: [ “a”, “b”, “c”, “d” ] }
    Sequence of comma-separated values (any data type); enclosed in square brackets.
  • Object{ “myObject”: { “id”: 7 } };
    Unordered collection of comma-separated key/value pairs; enclosed in curly braces; properties (keys) are distinct strings.
  • Null{ “myNull”: null }
    Variable with null (empty) value.

Unsupported Data Types


  • Undefinedvar myUndefined;
    Variable with no value assigned.
  • Datevar myDate = new Date();
    Object used to work with dates and times.
  • Errorvar myError = new Error();
    Object containing information about errors.
  • Regular Expressionvar myRegEx = /json/i;
    Variable containing a sequence of characters that form a search pattern.
  • Functionvar myFunction = function(){};
    Variable containing a block of code designed to perform a particular task.

JSON cheat sheet

Example1: Mixed Data Types

var myObject = {
“myNumber”: 123.456,
“myString”: “abcdef”,
“myBool”: true,
“myArray”: [ “a”, “b”, “c”, “d” ],
“myObject”: { “id”: 7 },
“myNull”: null
};

Example2: Send HTTP POST request with JSON to a http://url with the following string fields: ‘first_name’, ‘last_name’, ’email’, ‘phone’,’urls’


AI Unraveled: Demystifying Frequently Asked Questions on Artificial Intelligence (OpenAI, ChatGPT, Google Bard, Generative AI, Discriminative AI, xAI, LLMs, GPUs, Machine Learning, NLP, Promp Engineering)

curl -X POST -d ‘{“first_name”: “John”, “last_name”: “Doe”, “email”: “johndoe@email.com”, “phone”: “000-000-0000″,”urls”: [“https://djamga.com”,”https://enoumen.com”,”http://twitter.com/enoumen”]}’ http:/url -H ‘Content-Type: application/json’

Pass the 2023 AWS Cloud Practitioner CCP CLF-C02 Certification with flying colors Ace the 2023 AWS Solutions Architect Associate SAA-C03 Exam with Confidence Pass the 2023 AWS Certified Machine Learning Specialty MLS-C01 Exam with Flying Colors

List of Freely available programming books - What is the single most influential book every Programmers should read



#BlackOwned #BlackEntrepreneurs #BlackBuniness #AWSCertified #AWSCloudPractitioner #AWSCertification #AWSCLFC02 #CloudComputing #AWSStudyGuide #AWSTraining #AWSCareer #AWSExamPrep #AWSCommunity #AWSEducation #AWSBasics #AWSCertified #AWSMachineLearning #AWSCertification #AWSSpecialty #MachineLearning #AWSStudyGuide #CloudComputing #DataScience #AWSCertified #AWSSolutionsArchitect #AWSArchitectAssociate #AWSCertification #AWSStudyGuide #CloudComputing #AWSArchitecture #AWSTraining #AWSCareer #AWSExamPrep #AWSCommunity #AWSEducation #AzureFundamentals #AZ900 #MicrosoftAzure #ITCertification #CertificationPrep #StudyMaterials #TechLearning #MicrosoftCertified #AzureCertification #TechBooks

Top 1000 Canada Quiz and trivia: CANADA CITIZENSHIP TEST- HISTORY - GEOGRAPHY - GOVERNMENT- CULTURE - PEOPLE - LANGUAGES - TRAVEL - WILDLIFE - HOCKEY - TOURISM - SCENERIES - ARTS - DATA VISUALIZATION
zCanadian Quiz and Trivia, Canadian History, Citizenship Test, Geography, Wildlife, Secenries, Banff, Tourism

Top 1000 Africa Quiz and trivia: HISTORY - GEOGRAPHY - WILDLIFE - CULTURE - PEOPLE - LANGUAGES - TRAVEL - TOURISM - SCENERIES - ARTS - DATA VISUALIZATION
Africa Quiz, Africa Trivia, Quiz, African History, Geography, Wildlife, Culture

Exploring the Pros and Cons of Visiting All Provinces and Territories in Canada.
Exploring the Pros and Cons of Visiting All Provinces and Territories in Canada

Exploring the Advantages and Disadvantages of Visiting All 50 States in the USA
Exploring the Advantages and Disadvantages of Visiting All 50 States in the USA


Health Health, a science-based community to discuss health news and the coronavirus (COVID-19) pandemic

Today I Learned (TIL) You learn something new every day; what did you learn today? Submit interesting and specific facts about something that you just found out here.

Reddit Science This community is a place to share and discuss new scientific research. Read about the latest advances in astronomy, biology, medicine, physics, social science, and more. Find and submit new publications and popular science coverage of current research.

Reddit Sports Sports News and Highlights from the NFL, NBA, NHL, MLB, MLS, and leagues around the world.

error: Content is protected !!