Write a JSON Parser from Scratch

hard
Unit 23 · Parsing II0/2 to milestone

Implement parse_json(text) without using the json module. It should support:

  • objects, arrays, strings, numbers (integers, decimals, exponents and negatives), true, false and null
  • string escapes: \", \\, \/, \n, \t, \r, \b, \f and \uXXXX
  • whitespace anywhere between tokens
Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Write a JSON Parser from Scratch · TechGradify