8 - Introduction to JSON and Using It in the Browser — Topics & Learning Outcomes

📋 Module Topics🎯 Student Learning Outcomes

Module Topics

What is JSON?

An introduction to the JSON (JavaScript Object Notation) data format, its purpose, and why it is widely used for data interchange on the web.

JSON Syntax and Structure

An exploration of the rules and structure of valid JSON, including data types, objects, arrays, and formatting conventions.

Parsing JSON in JavaScript

How to convert a JSON string into a usable JavaScript object using JSON.parse(), including handling common errors.

Stringifying JavaScript Objects to JSON

How to convert JavaScript objects into JSON strings using JSON.stringify(), and when this operation is needed in web development.

Fetching JSON Data with the Fetch API

How to use the modern Fetch API to retrieve JSON data from a server or external source and process the response in the browser.

Fetching JSON Data with XMLHttpRequest

How to use the older XMLHttpRequest method to retrieve JSON data, providing context for legacy codebases and browser compatibility.

Displaying JSON Data in a Web Page

Techniques for dynamically rendering fetched JSON data in the browser by manipulating the DOM to present information to users.

Student Learning Outcomes

By the end of this module, students will be able to:

MO1
Identify the syntax rules, supported data types, and structural elements — including objects, arrays, and nested structures — that constitute valid JSON
Level: RememberType: CognitiveCourse mapping: —
MO2
Differentiate between a JSON-formatted string and a native JavaScript object, explaining how JSON.parse() and JSON.stringify() convert between the two formats
Level: AnalyzeType: CognitiveCourse mapping: —
MO3
Construct JavaScript code that retrieves JSON data from an external source using the Fetch API or XMLHttpRequest, parses the response, and handles both network and HTTP errors appropriately
Level: ApplyType: BehavioralCourse mapping: —
MO4
Compare the Fetch API and XMLHttpRequest approaches for retrieving JSON data, evaluating the trade-offs between modern promise-based syntax and legacy compatibility requirements
Level: EvaluateType: CognitiveCourse mapping: —
MO5
Produce a dynamic web page that fetches JSON data, iterates over JSON arrays, and renders the results by manipulating the DOM using both innerHTML string-building and programmatic node creation techniques
Level: CreateType: BehavioralCourse mapping: —

Course Outcomes (reference)

No course outcomes have been defined.