简体   繁体   中英

Json object img url problem when encode from PHP and andriod studio

My json php encoded with a slash problem. When php encoded a web image address it shows slashes instead of normal slashes. This is what it shows when json php encoded the url of an image address.

{"posts":[{"id":"326","img_url":"http:\ / \ /doman name.com\ /folder\ /images\ /name - Copy.jpg"},{"id":"325","img_url":"http:\ / \ /doman name.com\ /folder\/images\ /d.jpg"}]}

I finally found the problem after gotten some help from you guys about escape slashes. Thank you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM