Writing a JSON Parser in BQN
tony-zorman.com·6h·
Flag this post

At least, for some vague definition of json. I will restrict myself to the following underspecified subset, so that this will not be a 20’000-word post:

  • Only (positive) integers.
  • ASCII only and only \-based escaping.
  • No constants.
  • Absolutely no input validation—we’ll try to parse the wildest things. Some of those are not difficult to add: adding negative integers is a 4-character change, and other number formats are not much harder. Constants are a fun exercise for the reader, and also useful…

Similar Posts

Loading similar posts...