Open LYluyu opened 2 years ago
find_and_replace("Pods/HandyJSON/Source/BuiltInBasicType.swift", "formatter.maximumFractionDigits = 16", "formatter.maximumFractionDigits = 10")
这个在 JSON 解析这里就失败了, "data":"{\"title... , 可以看出来 data 字段的内容也是一个 JSON 字符串, 这种嵌套就需要转义, 看起来 \" 已经转义了, 但实际上 \ 也是需要转义的, 正确的格式应该是 "data":"{\\"title...
这个字符串为什么解析不出来呢
class Attachment: NSObject { var type : String? var subType : String? var data: [String:Any]?
}
{\"type\":\"SYSTEM\",\"subType\":\"SYSTEM_TITLE_URL\",\"data\":\"{\\"title\\":\\"View notification\\",\\"msg\\":\\"User100833 ID(100833) viewed your profile, drop a line to see if User100833 needs help.Get $0.1 if you reply to your customer within 1 minute\\",\\"url\\":\\"star://message/messageDetail?businessId=211215095623664950135157010094\\",\\"appAlertFlag\\":true}\"}