[ https://issues.apache.org/jira/browse/MDEP-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17846973#comment-17846973 ]
ASF GitHub Bot commented on MDEP-799: ------------------------------------- LogFlames commented on code in PR #325: URL: https://github.com/apache/maven-dependency-plugin/pull/325#discussion_r1603482791 ########## src/test/java/org/apache/maven/plugins/dependency/tree/TestTreeMojo.java: ########## @@ -127,6 +127,24 @@ public void _testTreeTGFSerializing() throws Exception { assertTrue(findString(contents, "testGroupId:release:jar:1.0:compile")); } + /** + * Test the JSON format serialization + */ + public void _testTreeJsonSerialzing() throws Exception { + List<String> contents = runTreeMojo("tree1.json", "json"); + assertTrue(findString(contents, "\"testGroupId\": \"project\"")); Review Comment: I want to double check: do you mean `contents.contains("...")`? Due to indentation the string might not be in the list of strings, but a substring of an element, which the `findString`-method seems to be created for in the same file. > improve mvn dependency:tree - add optional JSON output of the results > --------------------------------------------------------------------- > > Key: MDEP-799 > URL: https://issues.apache.org/jira/browse/MDEP-799 > Project: Maven Dependency Plugin > Issue Type: New Feature > Components: tree > Reporter: Zhenxu Ke > Priority: Major > > I'd like to add an output type JSON, will open a pull request soon -- This message was sent by Atlassian Jira (v8.20.10#820010)