1
我有一个NSDictionary的阵营本地JSONSerialization
address = {
address1 = "Ivy House";
address2 = "Sandy Lane";
city = Rush;
country = Ireland;
county = Dublin;
email = "[email protected]";
mobile = "<null>";
postCode = "<null>";
smsAlert = "<null>";
telephone = 18437584;
websiteAddress = "www.example.com";
};
,我需要通过这个反应母语作为接受JSON一个launchOptions是这种格式。 (报价及=替换为:等)
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"spotlight"
initialProperties:nil
launchOptions:launchOptions];
JSON
"address":
{
"address1": "Ivy House",
"address2": "Sandy Lane",
"city": "Rush",
"postCode": null,
"email": "[email protected]",
"telephone": "18437584",
"mobile": null,
"smsAlert": null,
"county": "Dublin",
"country": "Ireland",
"websiteAddress": "www.example.com"
},
什么是改变我的字典,使反应本土接受它的最佳方式?
你是否看了[JSONSerialization(https://developer.apple.com/reference/foundation/jsonserialization)文档? –