private void appendExpandItemJson(final JsonGenerator gen, final ExpandItem item) throws IOException { gen.writeStartObject(); if (item.isStar()) { gen.writeBooleanField("star", item.isStar()); } else if (item.getResourcePath() != null && !item.getResourcePath().getUriResourceParts().isEmpty()) { gen.writeFieldName("expandPath"); appendURIResourceParts(gen, item.getResourcePath().getUriResourceParts()); } if (item.isRef()) { gen.writeBooleanField("isRef", item.isRef()); } if (item.getLevelsOption() != null) { gen.writeFieldName("levels"); if (item.getLevelsOption().isMax()) { gen.writeString("max"); } else { gen.writeNumber(item.getLevelsOption().getValue()); } } appendCommonJsonObjects(gen, item.getCountOption(), item.getSkipOption(), item.getTopOption(), item.getFilterOption(), item.getOrderByOption(), item.getSelectOption(), item.getExpandOption(), item.getSearchOption(), item.getApplyOption()); gen.writeEndObject(); }
private void appendExpandItemJson(final JsonGenerator gen, final ExpandItem item) throws IOException { gen.writeStartObject(); if (item.isStar()) { gen.writeBooleanField("star", item.isStar()); } else if (item.getResourcePath() != null && !item.getResourcePath().getUriResourceParts().isEmpty()) { gen.writeFieldName("expandPath"); appendURIResourceParts(gen, item.getResourcePath().getUriResourceParts()); } if (item.isRef()) { gen.writeBooleanField("isRef", item.isRef()); } if (item.getLevelsOption() != null) { gen.writeFieldName("levels"); if (item.getLevelsOption().isMax()) { gen.writeString("max"); } else { gen.writeNumber(item.getLevelsOption().getValue()); } } appendCommonJsonObjects(gen, item.getCountOption(), item.getSkipOption(), item.getTopOption(), item.getFilterOption(), item.getOrderByOption(), item.getSelectOption(), item.getExpandOption(), item.getSearchOption(), item.getApplyOption()); gen.writeEndObject(); }