JSON & Data Formats Quiz

Test your skills in JSON and other common data formats like XML, CSV, and YAML with this quiz — ideal for developers and data professionals.

Quiz Options


About This Quiz

This quiz tests your knowledge of JSON and other common data formats used in web development, APIs, and data exchange. You'll encounter questions about syntax, use cases, and differences between formats.

Tip: Use the options panel to customize your quiz experience before starting.

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write, and for machines to parse and generate. It's commonly used in web APIs.

Comparison of Data Formats

Format Primary Uses Syntax Example File Extension
JSON APIs, configurations { "key": "value" } .json
XML Legacy APIs, configurations <key>value</key> .xml
CSV Spreadsheets, data export key1,key2\nvalue1,value2 .csv
YAML Configurations (Docker, GitHub Actions) key: value .yaml, .yml

Who Should Use This Quiz?

  • Web developers working with APIs
  • Data engineers dealing with serialized formats
  • Students learning web development
  • QA engineers testing RESTful services
  • DevOps professionals managing config files
Ready to Test Your Knowledge?

Configure your quiz options on the left and click "Start Quiz" when you're ready to begin!

Interactive Guide to Data Formats

JavaScript Object Notation (JSON)

JSON is a lightweight data-interchange format that is easy for humans to read and write and for machines to parse and generate.

Syntax Rules:
  • Data is in name/value pairs
  • Data is separated by commas
  • Curly braces hold objects
  • Square brackets hold arrays
  • Strings must be in double quotes
Example:
{
  "name": "John Doe",
  "age": 30,
  "isStudent": false,
  "courses": ["Math", "Science"],
  "address": {
    "street": "123 Main St",
    "city": "Anytown"
  }
}
Extensible Markup Language (XML)

XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.

Syntax Rules:
  • Uses tags like <tag>content</tag>
  • Must have a root element
  • Elements must be properly nested
  • Attribute values must be quoted
  • Tags are case sensitive
Example:
<person>
  <name>John Doe</name>
  <age>30</age>
  <isStudent>false</isStudent>
  <courses>
    <course>Math</course>
    <course>Science</course>
  </courses>
  <address street="123 Main St" city="Anytown"/>
</person>
Comma-Separated Values (CSV)

CSV is a simple file format used to store tabular data, such as a spreadsheet or database.

Syntax Rules:
  • Each record is on a separate line
  • Fields are separated by commas
  • Text fields may be enclosed in double quotes
  • If a field contains a comma, it must be enclosed in quotes
  • The first line may contain headers
Example:
name,age,isStudent,courses,address
"John Doe",30,false,"Math,Science","123 Main St, Anytown"
"Jane Smith",25,true,"History,Art","456 Oak Ave, Somewhere"
YAML Ain't Markup Language (YAML)

YAML is a human-readable data serialization standard that can be used in conjunction with all programming languages and is often used for configuration files.

Syntax Rules:
  • Uses indentation to denote structure
  • Key-value pairs are separated by a colon
  • Lists begin with a hyphen
  • Supports comments with #
  • Strings don't require quotes unless they contain special characters
Example:
name: John Doe
age: 30
isStudent: false
courses:
  - Math
  - Science
address:
  street: 123 Main St
  city: Anytown

Last Updated: Aug 18, 2025

Added new questions to help you practice JSON, XML, CSV, and YAML — great for developers and data pros.