Now that I have gotten the rant out of my system... I understand that JSON doesn't support raw data but what I am talking about is simply a convenience. You can readily turn Data into a base64 string and it looks like Apple was heading there.
This isn't accurate. Your points 1, 2, 3 and 4 are correct. But it doesn't matter whether Data adopts Codable or just Encodable & Decodable. Codable only exists as a convenience to avoid writing Encodable & Decodable.
There isn't (or at least shouldn't be) any API that demands explict Codable conformance. JSONEncoder requires values conforming to Encodable, and JSONDecoder requires values conforming to Decodable. Data conforms to both protocols, so works with both JSON classes.
You can see this for yourself in a playground:
let d = Data(repeating: 1, count: 10) let r = try! JSONEncoder().encode([d]) print(String(data: r, encoding: .utf8)!) // prints: ["AQEBAQEBAQEBAQ=="]
Note that you can't encode just "d" in line 2, because the default behavior is to require an array or dictionary at the top level.
I'm not sure exactly what problem you ran into, but encoding and decoding Data should be very easy.