a real Maven project filePassed
deft xml convert commons-lang.xml --to json -o out.json
Input
commons-lang.xml 34.8 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>107</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>commons-lang3</artifactId>
<version>3.22.0-SNAPSHOT</version>
<name>Apache Commons Lang</name>
<inceptionYear>2001</inceptionYear>
<description>
Apache Commons Lang is a package of Java utility classes for the Java lang packages,
classes that could be considered standard to justify their existence in java.lang.
The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21, and 25.
See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml
Please ensure your build environment is up-to-date and kindly report any build issues.
Starting with Commons Lang 3.9, we target Java 8 and use those features.
For advice on upgrading from 2.x to 3.x, see https://commons.apache.org/lang/article3_0.html
</description>
<url>https://commons.apache.org/proper/commons-lang/</url>
<ciManagement>
<system>github</system>
<url>https://github.com/apache/commons-lang/actions</url>
</ciManagement>
<issueManagement>
<system>jira</system>
<url>https://issues.apache.org/jira/browse/LANG</url>
</issueManagement>
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/commons-lang.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-lang.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf/commons-lang.git</url>
<tag>rel/commons-lang-3.21.0</tag>
</scm>
<!-- Lang should depend on very little -->
<dependencies>
<!-- testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<scope>test<
… 32602 more charactersOutput
out.json 29.5 KB
{
"project": {
"@schemaLocation": "http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd",
"parent": {
"groupId": "org.apache.commons",
"artifactId": "commons-parent",
"version": "107"
},
"modelVersion": "4.0.0",
"artifactId": "commons-lang3",
"version": "3.22.0-SNAPSHOT",
"name": "Apache Commons Lang",
"inceptionYear": "2001",
"description": "Apache Commons Lang is a package of Java utility classes for the Java lang packages,\n classes that could be considered standard to justify their existence in java.lang.\n\n The code is tested using the latest revision of the JDK for supported LTS releases: 8, 11, 17, 21, and 25.\n See https://github.com/apache/commons-lang/blob/master/.github/workflows/maven.yml\n\n Please ensure your build environment is up-to-date and kindly report any build issues.\n\n Starting with Commons Lang 3.9, we target Java 8 and use those features.\n\n For advice on upgrading from 2.x to 3.x, see https://commons.apache.org/lang/article3_0.html",
"url": "https://commons.apache.org/proper/commons-lang/",
"ciManagement": {
"system": "github",
"url": "https://github.com/apache/commons-lang/actions"
},
"issueManagement": {
"system": "jira",
"url": "https://issues.apache.org/jira/browse/LANG"
},
"scm": {
"connection": "scm:git:https://gitbox.apache.org/repos/asf/commons-lang.git",
"developerConnection": "scm:git:https://gitbox.apache.org/repos/asf/commons-lang.git",
"url": "https://gitbox.apache.org/repos/asf/commons-lang.git",
"tag": "rel/commons-lang-3.21.0"
},
"dependencies": {
"dependency": [
{
"groupId": "org.junit.jupiter",
"artifactId": "junit-jupiter",
"scope": "test"
},
{
"groupId": "org.junit-pioneer",
"artifactId": "junit-pioneer",
"scope": "test"
},
{
"groupId": "org.easymock",
"artifactId": "easymock",
"version": "5.6.0",
"scope": "test"
},
{
"groupId": "org.mockito",
"artifactId": "mockito-inline",
"scope": "test"
},
{
"groupId": "org.apache.commons",
"artifactId": "commons-text",
"version": "${commons.text.version}",
"scope": "test"
},
{
"groupId": "org.openjdk.jmh",
"artifactId": "jmh-core",
"version": "${commons.jmh.version}",
"scope": "test"
},
{
"groupId": "org.openjdk.jmh",
"artifactId": "jmh-generator-annprocess",
"version": "${commons.jmh.version}",
"scope": "test"
}
]
},
"distributionManagement": {
"site": {
"id": "apache.website",
"name": "Apache Commons Site",
"url": "scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/conten
… 27221 more charactersWhat it printed
ok xml.convert commons-lang.xml -> out.json 30KB 0.01s warning: comments are not kept
Automatic checks (1)
- python: code = "import json; d = json.load(open('out.json')); assert d['project']['artifactId'] == 'commons-lang3', list(d['project'])[:8]"