简体   繁体   中英

Delete particular data from Json url using android

我已经使用android从Json url获取了多个数据,但是我需要使用android.json删除json url中的特定数据。如何从json url删除特定数据?

I dont think that you can directly delete server data. Try to do some PHP code for that and you can invoke it from android.ie, you can separate functions by adding arguments in http request.

I don't know sure what you're trying to remove, if some data from the URL, or from the response. Anyway, if you know the exact string you're trying to remove, you could use the method replaceAll(String) from the String class.

For example:

String finalUrl = url.replaceAll("/partof/theurl/", "");

Hope this helps 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