我需要{"location":{"lat": 50.4, "lng": 30.5}}
发送服务器上如何在服务器上发送变量float?
我这样做
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
List<NameValuePair> gps = new ArrayList<NameValuePair>(2);
gps.add(new BasicNameValuePair("lat", Util
.getLatitude()));
gps.add(new BasicNameValuePair("lng", Util
.getLatitude()));
nameValuePairs.add(new BasicNameValuePair("location",gps.toString()));
{"location":{"lat": "50.4", "lng": "30.5"}}
我需要发送
为什么你不只是将其丢在服务器端从字符串到浮动? – 2013-02-19 08:47:15
因为客户想要,我必须了解我可以发送浮动吗? – 2013-02-19 08:49:57