【发布时间】:2013-04-26 06:01:49
【问题描述】:
我正在开发将文件名和文件路径存储在 NSDictionary 中的应用程序。我的字典喜欢,
Dict Path : {
background = "file://localhost/var/mobile/Applications/6118A03F-345B-42D5-AC19-25F6D9AC4484/Documents/background.caf";
bgMusic = "file://localhost/var/mobile/Applications/6118A03F-345B-42D5-AC19-25F6D9AC4484/Documents/bgMusic.caf";
}
它工作正常,但是当我尝试将字典转换为 JSON 字符串时,
NSString *strPathForSong = [json stringWithObject:dictPath];
NSLog(@"path sting : %@",strPathForSong);
它返回空字符串。那么有没有办法将具有“/”字符串的字典转换为json字符串? 提前谢谢你
【问题讨论】:
-
您能否提供您如何尝试将 NSDictionary 转换为 JSON 的源代码?
-
我已经在我的问题中提到了。请检查。
标签: ios objective-c parsing nsstring sbjson