Fix Encodable/Decodable deprecation warnings