Skip to content

nqloc/converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web tool for converting JSON to XML and and vice versa

Live Demo Codepen


  1. JSON to XML
  2. XML to JSON

JSON to XML

Input

{
    "employees": {
        "employee": [
            {
                "firstName": "John",
                "lastName": "Doe"
            },
            {
                "firstName": "Anna",
                "lastName": "Smith"
            },
            {
                "firstName": "Peter",
                "lastName": "Jones"
            }
        ]
    }
}

Output

<employees>
    <firstName>John</firstName>
    <lastName>Doe</lastName>
</employees>
<employees>
    <firstName>Anna</firstName>
    <lastName>Smith</lastName>
</employees>
<employees>
    <firstName>Peter</firstName>
    <lastName>Jones</lastName>
</employees>

XML to JSON

Input

<employees>
    <firstName>John</firstName>
    <lastName>Doe</lastName>
</employees>
<employees>
    <firstName>Anna</firstName>
    <lastName>Smith</lastName>
</employees>
<employees>
    <firstName>Peter</firstName>
    <lastName>Jones</lastName>
</employees>

Output

{
    "employees": {
        "employee": [
            {
                "firstName": "John",
                "lastName": "Doe"
            },
            {
                "firstName": "Anna",
                "lastName": "Smith"
            },
            {
                "firstName": "Peter",
                "lastName": "Jones"
            }
        ]
    }
}

Like my stuff?

Would you like to buy me a coffee or send me a tip? While it's not expected, I would really appreciate it.

Paypal Buy Me A Coffee

Releases

No releases published

Packages

No packages published

Languages