/**
* »ñÈ¡JSONÐÎʽµÄ»ùÕ¾ÐÅÏ¢
* @param mcc Òƶ¯¹ú¼Ò´úÂ루ÖйúµÄΪ460£©
* @param mnc Òƶ¯ÍøÂçºÅÂ루ÖйúÒƶ¯Îª0£¬ÖйúÁªÍ¨Îª1£¬ÖйúµçÐÅΪ2£©£»
* @param lac λÖÃÇøÓòÂë
* @param cid »ùÕ¾±àºÅ
* @param bsss »ùÕ¾ÐźÅÇ¿¶È
* @return json
* @throws JSONException
*/
private String getJsonCellPos(int mcc, int mnc, int lac, int cid, int bsss) throws JSONException {
JSONObject jsonCellPos = new JSONObject();
jsonCellPos.put("version", "1.1.0");
jsonCellPos.put("host", "maps.google.com");
JSONArray array = new JSONArray();
JSONObject json1 = new JSONObject();
json1.put("location_area_code", "" + lac + "");
json1.put("mobile_country_code", "" + mcc + "");
json1.put("mobile_network_code", "" + mnc + "");
json1.put("age", 0);
json1.put("cell_id", "" + cid + "");
json1.put("signal_strength", bsss);
array.put(json1);
jsonCellPos.put("cell_towers", array);
return jsonCellPos.toString();
}
ÇëÇóµÄJSON×Ö·û´®£º
{
"cell_towers":
[
{
"mobile_network_code":"0",
"location_area_code":"6338",
"cell_id":"62291",
"signal_strength":-95,
"age":0,
"mobile_country_code":"460"
}
],
"host":"maps.google.com",
"version":"1.1.0"
}
·µ»ØJSONÐÎʽ½á¹û£º
{
"location":
{
 
; "latitude":"31.214667405",
"longitude":"121.59903152499999",
&nbs
p; "address":
{
 
; "city":"
ÉϺ£ÊÐÆÖ¶«ÐÂÇø¹ùÊؾ´Â·;ÉϺ£°ÂÍþ¿Æ¼¼¿ª·¢¹«Ë¾¡¢
¿ÆÍþ¹ú¼Ê¼¼ÊõתÒÆÖÐÐĹ«Ë¾¡¢ÕŽ¸ß¿Æ¼¼Ô°ÇøÈÈÁ¦ÖÐÐÄ[¸½½ü]",
"country":"",
"country_code":"",
 
; "county":"",
 
; "postal_code":"",
"region":"",
"street":"",
"street_number":""
}
},
"access_token":"dummytoken"
}
2¡¢Í¨¹ý¶à¸ö¸½½üµÄ»ùÕ¾ÐÅÏ¢¶¨Î»£º
ÓÖÒ»´Î²ÂÏ룺
ÇëÇóJSON£º
¡¡