Code Robo
Virtual Service
Tester / Comparator
Converter
Utility
Java Code Complience
Validator
Formatter
EncoderDecoder

XML To JSON Converter
Talk to EasyAssistant

Both XML and JSON are used almost every application. Converting xml to json is very common ask. XML To JSON Converter tool converts Xml to Json string. Takes XML as input and produces JSON string. It provides the option to add thrird bracket('[') for repetitive elelemts in XML.
Click Here To Watch A Demo On It(https://youtu.be/mdEH_XUigRU).

 
XML.(* Required): It is required. | Watch A Demo
Add '[' When Repeatative Element Is There']' Output in compact format? Remove root element name from generated JSON string.


How It Works:
XML and JSON :
XML - is an extensible markup language which is used to exchange data between applications. Its like HTML but does not have any predefied tag.
JSON- is the JavaScript Object Notation and is the lightweight format for exchanging data. It first validate the input XML String and analyse it. It extracts the attributes and its values from the XML. Form the JSON string.
XML To JSON converter tool converts the XML string to its equivalent JSON format. It parse the input XML string. Analyse the elements and attributes. then converts xml attributes to the JSON keys with the prefix -.
Parameters are:
  1. XML: Source XML content.
  2. Remove Root Element Name: Whether to remove the root element name from the output JSON string or not.
  3. Add '[]': Whether to add the '[' ']' when there is a JSON array.
Steps to follow:
  1. Put XML content in the text area.
  2. Check the checkbox 'Add '[' When Repeatative Element Is There']' .
  3. Click on 'XML To JSON' button. Generated JSON will be displayed in the next page in a text area.
  4. Copy and save it..
XML file which has been used here:
<?xml version="1.0" encoding="UTF-8"?>
<Author DOB="" EMailID="" SSN=""> 
  <Extn ExternalSystemCode=""/> 
  <Books> 
    <Book BookNo="1" Name="" PublisherCode=""> 
      <Extn ExtnGiftCoverCode=""/> 
      <Price DiscountPercentage="" ListPrice="" UnitOfMeasure=""/> 
    </Book> 
  </Books> 
</Author>
<?xml version="1.0" encoding="UTF-8"?>
<Employee dateOfJoining="" department="" designation="" employeeNo="" firstName="" lastName="">
    <dependants>
        <dependant age="" location="" name="" relation="">
            <mediclaimPolicy coverageDetails="" endDate="" policyName="" policyNo="" startDate="" sumInsuredAmt=""/>
        </dependant>
    </dependants>
</Employee>
Rules Used:
  • Attributes are treated as regular JSON properties
  • Terminal #text item types is converted into a JSON property.
  • Namespaces are ignored.
  • Attribute name starting with '_' is treated as element in the target XML.
  • Produces two JSON, One with same case. Another with XML Case (First letter of element and attribute in the target xml will be in upper case)
User Comments:
anonymous:
Thank you! I liked this tool very much as its converting the attribute in camel case in the produced JSON.
    Reply;

anonymous:
Excellent! Its adding extra '[' for JSON array intelligently!
    Reply;
Aparna Roy:
I liked it the way its automatically identifying JSON array!
    Reply


Post Your Comment:
Name :
Email ( Optional*) :
Comments / Suggestion (* Required) It is required: :
: