All Projects Intermediate Coming Soon

JSON Parser

Write a compliant JSON parser from scratch in modern C++ using only the standard library. You tokenise the input, build a recursive-descent parser for objects, arrays, strings, numbers, and literals, and represent the document tree with std::variant. A rigorous exercise in parsing and modern value types.

~6 hours

Support Free C++ Education

Help us keep this platform free for everyone! Your support enables us to create more high-quality lessons, exercises, and interactive content.

Become a Patron

What You'll Build

A JSON parsing library that reads text into an in-memory value tree you can query and serialise back out, handling nested objects, arrays, escaped strings, and numeric edge cases.

Learning Objectives

  • Tokenise JSON text into a stream of typed tokens
  • Represent any JSON value with std::variant and recursive types
  • Build a recursive-descent parser for objects and arrays
  • Store object members in a std::unordered_map or std::map
  • Decode escape sequences and validate numeric literals
  • Report parse errors with line and column context
  • Serialise the value tree back to well-formed JSON text

Coming Soon

This project is in development. Register your interest and we'll email you the moment it goes live.

No spam. Unsubscribe anytime.

Coming Soon

This project is in development. Register your interest and we'll email you the moment it goes live.

No spam. Unsubscribe anytime.