Back to Browse

Implement a JSON parser from scratch in 10 minutes (Python)

3.1K views
Dec 13, 2023
10:50

Have you ever thought about creating your own programming language, but didn't know where to start? Are you confused about the difference between a parser and a lexer/scanner? It can be quite overwhelming knowing where to start. Most resources point towards "the dragon book" and you should learn all about formal language theory and compilers. In this video I want to show you that actually getting started isn't as hard as you think. You don't need parser generators or formal understandings of grammar. JSON is a wonderful example because the grammar is simple and you're most likely already familiar with it. Build a fully functioning parser with me as I walk you through this programming tutorial step by step in Python. I really hope this inspires you to play around with your own toy languages. If you want to dig a little further, I highly recommend https://craftinginterpreters.com/ which is free online. You'll be able to build out your own real programming language. You can find the source code for this parser on my GitHub: https://github.com/jordanwebster/pyjsonparser Please consider following me on Twitter: https://twitter.com/jwebster_dev

Download

1 formats

Video Formats

360pmp417.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Implement a JSON parser from scratch in 10 minutes (Python) | NatokHD