Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.