我正在开发将文件名和文件路径存储在 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字符串?先感谢您