Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图片地址数组,转json字符串时,//变成\/ #862

Closed
iOS-Kel opened this issue Apr 24, 2024 · 1 comment
Closed

图片地址数组,转json字符串时,//变成\/ #862

iOS-Kel opened this issue Apr 24, 2024 · 1 comment

Comments

@iOS-Kel
Copy link

iOS-Kel commented Apr 24, 2024

例如:
NSArray *arr = @[@"https://cdn.szyiqc.com/img1.png, @"https://cdn.szyiqc.com/img2.png"];

[arr mj_JSONString]; // 输入结果是 ["https://cdn.szyiqc.com/img1.png", "https://cdn.szyiqc.com/img2.png"]

导致图片路径错误了,这个咋整?

@iOS-Kel
Copy link
Author

iOS-Kel commented Apr 24, 2024

我的解决方法如下,供大家参考
[[imageUrls mj_JSONString] stringByReplacingOccurrencesOfString:@"\/" withString:@"/"]

@iOS-Kel iOS-Kel closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant