These try! assertions were incorrect. They were focused on the fact that the type of the value in the input JSON was guaranteed to be a string, but with the on-demand parsing behavior, there is no longer any initial UTF-8 validation step, which means decoding the keys into String values could fail. This needs to actually throw an error instead of trapping. Fortunately, this is an (embarrassingly) easy change to make.
These
try!
assertions were incorrect. They were focused on the fact that the type of the value in the input JSON was guaranteed to be a string, but with the on-demand parsing behavior, there is no longer any initial UTF-8 validation step, which means decoding the keys into String values could fail. This needs to actually throw an error instead of trapping. Fortunately, this is an (embarrassingly) easy change to make.