Techniques for parsing strings (and more JSON)

It also gets tied into undefined behaviour: Why `?` and `orelse unreachable` behave inconsistently under ReleaseFast/ReleaseSmall

Either way, @Validark is right. In the general case (and in the case of parsing strings) checking an optional should be your default. So any time you have a something.? then consider making that an if (something) |thing| - you can also use orelse… check out the link to see a few examples of that.

1 Like