1 / 8

📄 Lesson: What is JSON?

Understanding JSON Structure & Syntax

Learning Objectives:

📋 What JSON stands for and what it is
🏗️ Understand JSON's two main structures
🔤 Learn JSON data types
📝 Master JSON syntax rules

🤔 What is JSON?

JSON = JavaScript Object Notation

Important: Despite the name "JavaScript", JSON is used by ALL programming languages - Python, Java, C#, PHP, etc.

🏗️ JSON Has Only 2 Structures

Everything in JSON is built from these two simple structures:

📦 OBJECTS

Collection of key-value pairs

{ "key": "value" }

📋 ARRAYS

Ordered list of values

[ "value1", "value2" ]
That's it! Every JSON document is either an object, an array, or a combination of both.

📦 JSON Objects

Objects store data as key-value pairs inside curly braces { }

📝 Editable JSON Object Example
Object Rules:
• Wrapped in curly braces { }
• Keys must be strings (in quotes)
• Key and value separated by colon :
• Pairs separated by commas ,

📋 JSON Arrays

Arrays store ordered lists of values inside square brackets [ ]

📝 Editable JSON Array Example
Array Rules:
• Wrapped in square brackets [ ]
• Values separated by commas ,
• Can contain any data type
• Order matters (first, second, third...)

🔤 JSON Data Types

JSON supports exactly 6 data types:

String
"GBPUSD"
Number
1.35084
Boolean
true/false
Null
null
Object
{ }
Array
[ ]
📝 Try All Data Types

📝 JSON Syntax Rules

JSON has strict rules that must be followed:

❌ WRONG

✅ CORRECT

🎯 What You've Learned

JSON Structure Fundamentals:

  • ✅ JSON = JavaScript Object Notation
  • ✅ Two main structures: Objects { } and Arrays [ ]
  • ✅ Six data types: string, number, boolean, null, object, array
  • ✅ Strict syntax rules must be followed
🚀 Practice Area - Try Your Own JSON!

🚀 Next: We'll see how this structure works with real trading data!