ObjectToJsonConverter { public Object setInnerValue(Object pOuterObject, Object pNewValue, List<String> pPathParts) throws AttributeNotFoundException, IllegalAccessException, InvocationTargetException { String lastPathElement = pPathParts.remove(pPathParts.size()-1); Stack<String> extraStack = EscapeUtil.reversePath(pPathParts); Object inner = extractObjectWithContext(pOuterObject, extraStack, JsonConvertOptions.DEFAULT, false); return setObjectValue(inner, lastPathElement, pNewValue); } ObjectToJsonConverter(StringToObjectConverter pStringToObjectConverter,
                                 Extractor... pSimplifyHandlers); Object convertToJson(Object pValue, List<String> pPathParts, JsonConvertOptions pOptions); Object setInnerValue(Object pOuterObject, Object pNewValue, List<String> pPathParts); Object extractObject(Object pValue, Stack<String> pPathParts, boolean pJsonify); ValueFaultHandler getValueFaultHandler();  }
@Test public void setInnerValueTest() throws IllegalAccessException, AttributeNotFoundException, InvocationTargetException { InnerValueTestBean bean = new InnerValueTestBean("foo","bar","baz"); Object oldValue = converter.setInnerValue(bean,"blub",new ArrayList<String>(Arrays.asList("map","foo","1"))); assertEquals(oldValue,"baz"); assertEquals(bean.getMap().get("foo").get(0),"bar"); assertEquals(bean.getMap().get("foo").get(1),"blub"); oldValue = converter.setInnerValue(bean,"fcn",new ArrayList<String>(Arrays.asList("array","0"))); assertEquals(oldValue,"bar"); assertEquals(bean.getArray()[0],"fcn"); }