Great little utility, just what I needed for a project where I need to convert large XML files to JSON for use in a frontend application. The amount of whitespace generated is a problem though. In my case, the 5 MB XML file yielded a 40 MB Json file. Deleting the whitespace in that file made it 270 kB (!).
An option for generating a minified file without any whitespace would be really cool. Unfortunately I don't know the first thing about Java programming, otherwise I would have given it a go myself. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Great little utility, just what I needed for a project where I need to convert large XML files to JSON for use in a frontend application. The amount of whitespace generated is a problem though. In my case, the 5 MB XML file yielded a 40 MB Json file. Deleting the whitespace in that file made it 270 kB (!).
An option for generating a minified file without any whitespace would be really cool. Unfortunately I don't know the first thing about Java programming, otherwise I would have given it a go myself. :)
Hi Jan,
You may try alternative utility: xmltojson. It supports compact mode for generated json files.
Download link: https://github.com/javadev/underscore-java/releases/tag/test
Last edit: Valentyn Kolesnikov 2020-01-05