Since nil values are allowed in the converted dictionary, the type of json["thingThatMightBeNull"] is Optional<Optional<Any>>.Type , a doubly-wrapped optional. If you declare a type for your data– a struct or whatever– instead of using a dictionary directly, you can bypass the problem by using JSONDecoder to parse the JSON, followed by using PropertyListEncoder to create the property list. If you’re converting from a property list to JSON, it used to be that dates and binary data could require a bunch of extra work.