Safely unpacking JSON objects in Dart

7 min readJun 30, 2021

Navigating null safety with no implicit casts or implicit dynamic types

Switching to Dart 2.12 with sound null safety was overall pretty painless…except for one thing: All my JSON to object conversions broke, and it was super difficult to figure out how to make the errors go away.

In this article I’ll explain some of the background behind that and how to safely unpack JSON…