@Override protected Plugin parse(Object json) { WSUtils utils = WSUtils.getINSTANCE(); return new Plugin() .setKey(utils.getString(json, "key")) .setName(utils.getString(json, "name")) .setVersion(utils.getString(json, "version")); }
private TimeMachineColumn[] toColumns(Object cols) { WSUtils utils = WSUtils.getINSTANCE(); int size = utils.getArraySize(cols); TimeMachineColumn[] result = new TimeMachineColumn[size]; for (int index = 0; index < size; index++) { Object colJson = utils.getArrayElement(cols, index); result[index] = new TimeMachineColumn(index, utils.getString(colJson, "metric"), null, null); } return result; }