@Override public DocumentContext set(JsonPath path, Object newValue) { List<String> modified = path.set(json, newValue, configuration.addOptions(Option.AS_PATH_LIST)); if (logger.isDebugEnabled()) { for (String p : modified) { logger.debug("Set path {} new value {}", p, newValue); } } return this; }
@Override public DocumentContext set(JsonPath path, Object newValue){ List<String> modified = path.set(json, newValue, configuration.addOptions(Option.AS_PATH_LIST)); if(logger.isDebugEnabled()){ for (String p : modified) { logger.debug("Set path {} new value {}", p, newValue); } } return this; }
@Override public DocumentContext set(JsonPath path, Object newValue){ List<String> modified = path.set(json, newValue, configuration.addOptions(Option.AS_PATH_LIST)); if(logger.isDebugEnabled()){ for (String p : modified) { logger.debug("Set path {} new value {}", p, newValue); } } return this; }
public static void setField(Object jsonObject, Object newVal, String pathStr) { JsonPath path = getPath(pathStr); path.set(jsonObject, newVal, CONFIG); }
public static void setField(Object jsonObject, Object newVal, String pathStr) { JsonPath path = getPath(pathStr); path.set(jsonObject, newVal, CONFIG); }