When creating a JSONObject, the following error appears:
Caused by: java.lang.IllegalAccessException: Class org.json.JSONObject can not access a member of class java.util.HashMap with modifiers "private"
DTO has 3 properties:
private list aList = new ArrayList(); private Map<String, Map<String, BigDecimal>> aMapOfMaps = new HashMap<String, Map<String, BigDecimal>>(); private Map<String, BigDecimal> aMap = new HashMapMap<String, BigDecimal>();
Error creating JSON object, obj = new JSONObject(object);
where object is the DTO object. Not sure what I'm doing wrong here or something is missing. I would really appreciate any pointers to soln.
source share