2
元のオブジェクトを変更せずにJsonPath DocumentContextを変更しようとしていますが、これは可能ですか?元のオブジェクトを更新せずにJsonPath DocumentContextを更新する
私のJSONの構造は
{
"header": {},
"content": [
"contentValue": {
"value": [
{},
{}
]
}
]
}
DocumentContext ctx = JsonPath.parse(jsonString);
Object obj = JsonPath.read("$.content[0].contentValue.value[0]");
ctx.put("$.content[0]", "contentValue", obj);
このコードは、私がやりたいいけないオリジナルのCTXを変更します。これに関するどの方向性も大変高く評価されます。