Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 days 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 (10 months ago)
- Default Branch: main
- Last Pushed: 2024-06-12T00:18:36.000Z (7 months ago)
- Last Synced: 2024-11-18T18:02:09.415Z (2 months 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
* SwitchPackages 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.