ModelNode node = new ModelNode(); node.get("name").set("John"); node.get("age").set(30); node.get("address").get("city").set("New York");
String json = "{ \"name\": \"John\", \"age\": 30, \"address\": { \"city\": \"New York\" } }"; ModelNode node = ModelNode.fromJSONString(json);This code creates a new ModelNode object by parsing a JSON string. The resulting object has the same properties as in Example 1. Package library: org.jboss.dmr.