Convert XML to JSON array

Want to convert XML to JSON array?

Try Withdata Data File Converter, a desktop XML to JSON converter for Windows, MacOS, and Linux, Convert XML to JSON array, Easy and Fast.

  • Can run in GUI mode, Step by Step, just a few mouse clicks.
  • Can run in Command line, for Scheduled Tasks and Streams.
  • Convert files locally and privately, avoid uploading JSON file(s) to online services.

Download DataFileConverter Download DataFileConverter

Convert XML to JSON array

Choose XML file -> Set target JSON array file -> Convert XML to JSON array

Click “Start a New Convert” at task dialog.

Convert XML to JSON array - task window

then show the wizard.

Select source/target file type.

Convert XML to JSON array - select type

1. Open a XML file.

Convert XML to JSON array - open JSON lines file

The XML file content:

Convert XML to JSON array - JSON lines content

2. Config target JSON array file.

Convert XML to JSON array - config JSON array file

3. Set rows options.

Convert XML to JSON array - summary

4. Convert XML to JSON array.

Convert XML to JSON array - convert

See JSON array file

Convert XML to JSON array - view  JSON array file

Convert XML to JSON array in command line

Save “XML to JSON array” session, then you can:

Set scheduled tasks for converting XML to JSON array

You can schedule and automate this converting task by:

  1. Save session and create .bat (Windows) or .sh (Linux/macOS) file for “XML to JSON array” conversion.
  2. Set scheduled task for “XML to JSON array” conversion.

FAQ

What is Withdata DataFileConverter?
How long does it take to convert XML to JSON array?
Is it safe to convert XML to JSON array using DataFileConverter?
Can I convert XML to JSON array on Linux, Mac OS?
Can I convert XML to JSON array in command line?

More about Withdata DataFileConverter – XML to JSON array Converter

XML → JSON Array reference

Type mapping

Value kindin XMLin JSON Array
Int<int>1234</int>1234 (number)
Bigint<bigint>9007199254740993</bigint>9007199254740993
Decimal<decimal>1234.56</decimal>1234.56 (number)
Float<float>1.234e10</float>1.234e10 (number)
Text<char>text</char>"text" (string)
Long text<text>multi-line text</text> (entities for &amp; &lt;)"multi-line\ntext" (escaped newline inside a string)
Date<date>2026-09-18</date> (xs:date with an XSD)"2026-09-18" (string)
Datetime<datetime>2026-09-18T14:30:00Z</datetime> (xs:dateTime)"2026-09-18T14:30:00Z" (string)
Binary<blob>base64...</blob> (xs:base64Binary)"base64:..." (string)
Boolean<bool>true</bool>true / false (boolean)
JSONescaped inside an element, or its own sub-treenested object or array, kept as structure

Dialect differences

Both XML and JSON Array are file formats, so what differs below is how each one chooses to represent a value.

Propertyin XMLin JSON Array
identifiersAttribute values in quotes; entities (&amp; &lt; &gt;) for ...Double quotes; backslash escapes
datesText (xs:date / xs:dateTime when an XSD is in play)No date type: dates arrive as strings and the reader must p...
binarybase64Binary / hexBinary inside textNot supported natively - base64 inside a string
separatorTags, not delimitersBraces and commas
encodingDeclared in the XML declarationUTF-8 by definition
typingNone in the markup itselfstring, number, boolean, null, object, array - no date type
shapeArbitrary treeNested objects and arrays

Data File Converter without the manual work

For batch jobs, large files and scheduling use the Data File Converter converter — an offline desktop app for Windows, Linux and macOS. Free trial.


Posted

in

by