Choose the source and output folders
Use absolute Windows paths and keep the source unchanged until the generated files have been inspected.
Command-line conversion
Use one settings file to convert a folder of JSON or XML documents, include subfolders, control output and overwriting, and preserve a conversion log.
Repeatable folder conversion
valbuddy.exe reads an XML settings file that identifies the conversion direction, source folder, included file extensions, subfolder behavior, output folder, overwrite choice, and log destination.
Use absolute Windows paths and keep the source unchanged until the generated files have been inspected.
Use json2xml for JSON input or xml2json for XML input.
Pass the settings file to valbuddy.exe, then inspect the generated files and conversion log.
JSON to XML
The example includes .json files in the source folder and its subfolders, writes XML to a separate folder, and allows existing output files to be replaced.
<batch_settings>
<batch_units>
<log_document path="D:\Documents\convert_json_log.xml"/>
<batch_unit output_folder="D:\Documents\XML-converted"
overwrite="true" type="json2xml">
<folder_settings folder="D:\Documents\JSON" subfolders="true"/>
<file_extensions><extension>json</extension></file_extensions>
</batch_unit>
</batch_units>
</batch_settings>
valbuddy.exe myJSON2XMLconfig.xml
XML to JSON
Set type="xml2json" and use conversion parameters where the JSON representation needs attribute prefixes, namespace handling, string typing, whitespace preservation, or an XSLT preprocessing step.
add-attribute-prefixstrip-namespace and colon-replacetransform-xslforce-string-type and force-attributes-string-typepreserve-whitespaceBegin with a representative copy, write results to a separate folder, and inspect attributes, namespaces, arrays, repeated elements, encodings, and the log before processing the complete data set.
Platform availability