SOJO (Simplified Old Java Objects) is a Java framework
which converts object graph into a specific structure or representation.
This requires the library sojo-1.0.0.jar to be in classpath.
The following example shows using PathExecuter.setNestedProperty() API.
//Adds 'student4' to the student list
PathExecuter.setNestedProperty(complexBean, "studentList", student4);
System.out.println(complexBean.getStudentList());
//Updates the first student name in the student list
PathExecuter.setNestedProperty(complexBean, "studentList[0].name", "Sriram Kasireddi");
System.out.println(complexBean.getStudentList().get(0).getName());
//Updates student list for PHYSICS in subjectStudentMap
PathExecuter.setNestedProperty(complexBean, "subjectStudentMap(PHYSICS)", Arrays.asList(student));
System.out.println(complexBean.getSubjectStudentMap().get("PHYSICS"));
//Updates second students age in MATHS student list
PathExecuter.setNestedProperty(complexBean, "subjectStudentMap(MATHS).[1].age", 26);
System.out.println(complexBean.getSubjectStudentMap().get("MATHS").get(1).getAge());
//Updates second students name in MATHS student list
PathExecuter.setNestedProperty(complexBean, "subjectStudentMap.MATHS[1].name", "Sudhakar Kasireddi");
System.out.println(complexBean.getSubjectStudentMap().get("MATHS").get(1).getName());