}
JSONObject object = new JSONObject();
object.put("libraryName", libraryName);
object.put("rootPackage", libraryMapping.getRootPackage());
final ComponentLibraryInfo info = getInfo();
if (info != null)
{
JSONObject infoJsonObject = new JSONObject();
putIfNotNull("description", info.getDescription(), infoJsonObject);
putIfNotNull("homepage", info.getHomepageUrl(), infoJsonObject);
putIfNotNull("documentationUrl", info.getDocumentationUrl(), infoJsonObject);
putIfNotNull("javadocUrl", info.getJavadocUrl(), infoJsonObject);
putIfNotNull("groupId", info.getGroupId(), infoJsonObject);
putIfNotNull("artifactId", info.getArtifactId(), infoJsonObject);
putIfNotNull("version", info.getVersion(), infoJsonObject);
putIfNotNull("sourceBrowseUrl", info.getSourceBrowseUrl(), infoJsonObject);
putIfNotNull("sourceRootUrl", info.getSourceRootUrl(), infoJsonObject);
putIfNotNull("issueTrackerUrl", info.getIssueTrackerUrl(), infoJsonObject);
putIfNotNull("dependencyInfoUrl", info.getDependencyManagementInfoUrl(), infoJsonObject);
if (info.getTags() != null)
{
for (String tag : info.getTags())
{
infoJsonObject.accumulate("tags", tag);
}
}