Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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

About

JSON to XML, XML to JSON

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages