DartIntermediate5 topics

JSON, HTTP, files and command-line apps

Read and validate data, call services and use local files with explicit resource ownership.

Start with portable JSON and URL handling, then move to local files and HTTP clients. File-system and command-line examples require a local Dart project.

Your lessons

One clear step at a time
  1. 01Dart JSON encoding and models: preserve a typed API contractDecode untrusted JSON, validate required fields and encode an explicit response shape.2 min
  2. 02Dart DateTime, Duration, Uri and RegExp: process a delivery noticeKeep timestamps, durations, URLs and input patterns as distinct concepts.2 min
  3. 03Dart file I/O: write and read a small export safelyUse asynchronous local file APIs and release only the temporary directory owned by the operation.2 min
  4. 04Dart HTTP requests: status, JSON, timeout and client ownershipCall a service through an owned client and verify its response contract before parsing.2 min
  5. 05Dart command-line apps: arguments, stdin and exit codesBuild a useful command with validated inputs and predictable stdout/stderr behavior.2 min
View the full Dart course

Find your next idea

Search lessons, code examples and projects.

Type a few words to start exploring.