SpringBoot 2.2.4.RELEASE
- Convert XML to JSON
- Convert XML to CSV
- Convert JSON to XML
- Convert JSON to CSV
POST http://localhost:8081/converter
- Content-Type: application/xml
- Accept: application/json
<root>
<node>
<var1>My node 1 var1</var1>
<var2>My node 1 var2</var2>
</node>
<node>
<var1>My node 2 var1</var1>
<var2>My node 2 var2</var2>
</node>
</root>
{
"root": [
{
"var2": "My node 1 var2",
"var1": "My node 1 var1"
},
{
"var2": "My node 2 var2",
"var1": "My node 2 var1"
}
]
}
- Content-Type: application/xml
- Accept: text/plain
<root>
<node>
<var1>My node 1 var1</var1>
<var2>My node 1 var2</var2>
</node>
<node>
<var1>My node 2 var1</var1>
<var2>My node 2 var2</var2>
</node>
</root>
var1,var2
My node 1 var1,My node 1 var2
My node 2 var1,My node 2 var2
- Content-Type: application/json
- Accept: application/xml
{
"document": [
{
"description": "this is my description 1",
"title": "my Title 1"
},
{
"description": "this is my description 2",
"title": "my Title 2"
},
{
"description": "this is my description 3",
"title": "my Title 3"
},
{
"description": "this is my description 4",
"title": "my Title 4"
}
]
}
<root>
<document>
<description>this is my description 1</description>
<title>my Title 1</title>
</document>
<document>
<description>this is my description 2</description>
<title>my Title 2</title>
</document>
<document>
<description>this is my description 3</description>
<title>my Title 3</title>
</document>
<document>
<description>this is my description 4</description>
<title>my Title 4</title>
</document>
</root>
- Content-Type: application/json
- Accept: text/plain
{
"document": [
{
"description": "this is my description 1",
"title": "my Title 1"
},
{
"description": "this is my description 2",
"title": "my Title 2"
},
{
"description": "this is my description 3",
"title": "my Title 3"
},
{
"description": "this is my description 4",
"title": "my Title 4"
}
]
}
description,title
this is my description 1,my Title 1
this is my description 2,my Title 2
this is my description 3,my Title 3
this is my description 4,my Title 4