如何从org.json.JsonArray获取常见对象和不同对象

时间:2019-03-29 07:14:34

标签: java org.json

我有两个JsonArray对象,其中包含otherObjects的列表,例如

JsonArray1:-

"Person":[{"id":"8","isEligible":false,"data":"NO CALL"},{"id":"4","isEligible":false,"data":"LISTING"}, {"id":"3","isEligible":true,"data":"some-data"}]

JsonArray2:-

"Person":[{"id":"6","isEligible":false,"data":"NO CALL"},{"id":".4","isEligible":false,"data":"ALISTING"}, {"id":".7","isEligible":true,"data":"cancel"}, {"id":".9","isEligible":false,"data":"nothing"}]

在这里我要创建两个地图

  1. map.put(JsonArray1, JsonArray2)-这些应该具有共同的Person对象(基于ID)
  2. map.put(JsonArray1, JsonArray2)-这些应该具有不同的Person对象(基于ID)

0 个答案:

没有答案