我在我的机器上预装了GlassFish server3.1.2.2.我想在Eclipse Luna中使用它
如何手动配置它以在Eclipse中使用?
当我尝试使用Eclipse Market Place时,我收到错误 在http://download.oracle.com/otn_software/oepe/luna找不到存储库.
我尝试通过网络搜索,我指向Oracle Enterprise Pack for Eclipse(OEPE),大约485MB.
还有另一种方法吗?
我正在尝试修改一个 JSON(结构未知),其中 JsonPath 及其等效的 XML Xpath 是我已知的。
我已经厌倦了使用com.jayway.jsonpath.JsonPath
图书馆。JsonPath 的问题是,它返回值但我无法修改目标节点。
以下是我的代码片段
JsonPath.read(jsonFile, jsonPath);
JsonPath.parse(jsonPath);
System.out.println("Author: "+JsonPath.read(jsonFile, jsonPath));
Run Code Online (Sandbox Code Playgroud)
我尝试使用之前问过的问题中提到的杰克逊,但它需要按如下方式逐个节点遍历
((ObjectNode) parent).put(fieldName, newValue);
Run Code Online (Sandbox Code Playgroud)
由于未知的结构,我无法做到这一点。
我已经尝试了递归解析 JSON 对象问题的答案,但它说明了如何解析而不是修改
我需要做以下事情
JsonNode root = mapper.readTree("Json in form of String");
((JsonNode)(root.get("JsonPath")).set("New Value");
Run Code Online (Sandbox Code Playgroud)
有什么方法可以实现吗?