protected void toJson(DependencyNode node, String indent, StringBuilder sb, boolean last) {
sb.append(indent + "{\n");
String childIndent = indent + " ";
Dependency dependency = node.getDependency();
Artifact artifact = dependency.getArtifact();
appendJsonProperty(sb, childIndent, "groupId", artifact.getGroupId(), false);
appendJsonProperty(sb, childIndent, "artifactId", artifact.getArtifactId(), false);
String classifier = artifact.getClassifier();
if (Strings.isNotBlank(classifier)) {
appendJsonProperty(sb, childIndent, "classifier", classifier, false);
}
String extension = artifact.getExtension();
if (Strings.isNotBlank(extension) && !extension.equals("jar")) {
appendJsonProperty(sb, childIndent, "extension", extension, false);
}
String scope = dependency.getScope();
if (Strings.isNotBlank(scope)) {
appendJsonProperty(sb, childIndent, "scope", scope, false);
}
List<DependencyNode> children = node.getChildren();
if (!children.isEmpty()) {