使用Java中的键对JSON排序

时间:2019-03-06 13:27:46

标签: java json sorting

我有JSON对象(Java),它是一些键值对。我的主要目标是使用Intent intent = new Intent(this, GeofenceBroadcastReceiver.class); mGeofencePendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); 并按键排序后的结果。

反正我可以实现这一目标。

JSONObject.toString()

jsonObject.put("z","A"); jsonObject.put("x", "B"); jsonObject.put("n", "C"); jsonObject.put("t", "D");` 的预期输出

jsonObject.toString

0 个答案:

没有答案