📅  最后修改于: 2022-03-11 14:52:12.300000             🧑  作者: Mango
private void appendNodeToYaml(
JsonNode node, StringBuilder yaml, int depth, boolean isArrayItem) {
Iterator> fields = node.fields();
boolean isFirst = true;
while (fields.hasNext()) {
Entry jsonField = fields.next();
addFieldNameToYaml(yaml, jsonField.getKey(), depth, isArrayItem && isFirst);
processNode(jsonField.getValue(), yaml, depth+1);
isFirst = false;
}
}