https://github.com/ngrogg/xml2json-interparser
A script for moving JSON files to XML and vice-versa
https://github.com/ngrogg/xml2json-interparser
json linux perl xml
Last synced: 3 months ago
JSON representation
A script for moving JSON files to XML and vice-versa
- Host: GitHub
- URL: https://github.com/ngrogg/xml2json-interparser
- Owner: ngrogg
- Created: 2024-03-27T12:56:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-12T00:18:36.000Z (about 2 years ago)
- Last Synced: 2025-01-19T17:11:14.668Z (over 1 year ago)
- Topics: json, linux, perl, xml
- Language: Perl
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xml2json-interparser
## Overview
An in-progress Perl script for moving XML files to the JSON format or vice-versa.
### Requirements
Parser script requires the following modules:
* JSON
* JSON::Validator
* XML::Simple
* XML:LibXML
* Switch
Packages can be installed with the cpan command:
`cpan install JSON`
`cpan install JSON::Validator`
`cpan install Switch`
`cpan install XML:LibXML`
`cpan install XML::Simple`
## Usage
Takes an input file, it's format, and output file as arguments.
Usage, `./parser.pl format inFile outFile /path/to/outputFolder`
Ex. `./parser.pl xml inFile.xml outFile.json ~/Documents`
Parsed files are saved by default to ~/.
Passing an output filepath overrides this setting.
Has checks for files and file validation.
There are sample JSON and XML files located in the sampleInput folder.