nerdexam
Cisco

200-901 · Question #265

What is the difference between YAML and JSON data structure?

The correct answer is B. YAML uses indentation; JSON uses brackets and braces. YAML (YAML Ain't Markup Language) uses indentation and whitespace to represent data hierarchy and structure - no brackets or braces are needed. JSON (JavaScript Object Notation) uses curly braces {} for objects and square brackets [] for arrays to define structure. For example…

Software Development and Design

Question

What is the difference between YAML and JSON data structure?

Options

  • AYAML uses spaces; JSON uses parentheses
  • BYAML uses indentation; JSON uses brackets and braces
  • CYAML uses brackets and braces; JSON uses indentation
  • DYAML uses parentheses; JSON uses spaces

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    95% (21)

Explanation

YAML (YAML Ain't Markup Language) uses indentation and whitespace to represent data hierarchy and structure - no brackets or braces are needed. JSON (JavaScript Object Notation) uses curly braces {} for objects and square brackets [] for arrays to define structure. For example, a YAML key-value pair is written as name: Alice on its own line indented under a parent, while JSON would write {"name": "Alice"}. Option A is wrong because neither format uses parentheses as structural delimiters. Options C and D reverse the correct descriptions.

Topics

#YAML#JSON#Data Serialization#Syntax

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice