我收到类似下面的JSON对象。我如何将它转换成Swift 2.1容易处理的格式?我将收到其中的几个,并且必须将它们放入一个数组中并通过createdAt进行排序。如何从JSON创建字典
Optional({
comment = "<null>";
completedAt = "<null>";
createdAt = "2015-11-02 15:01:04 +0000";
paid = 1;
paidAt = "2015-11-02 15:01:04 +0000";
startedAt = "<null>";
state = request;
type = doctor;
user = KTsCySacEAiz3eDnf;
userdata = {
birthdate = "<null>";
gender = "<null>";
};
})
[斯威夫特:额外的参数“错误”在电话]的可能的复制(http://stackoverflow.com/questions/31073497/swift-extra-argument-error在通话) – Moritz
简单的例子,你在我的链接答案。 – Moritz
嗨,我看了看,它给我[_]是不是可兑换到NSJSONReadingOptions – KML