/mal2json

Convert MAL specifications into easily manipulable JSON files

Primary LanguageJavaApache License 2.0Apache-2.0

mal2json

mal2json is a tool that can be used to convert MAL specifications into easily manipulable JSON files.

Requirements

This project requires at least Java 10.

Build

mvn package
cp target/mal2json-1.0.0-jar-with-dependencies.jar mal2json.jar

Run

Generate JSON for a mal specification:

java -jar mal2json.jar path/to/mal_specification.mal > output_mal.json

Generate JSON for a mal specification spread over multiple files:

java -jar mal2json.jar path/to/fist.mal path/to/second.mal > output_mal.json

Generate JSON for a mal specification spread over multiple files within a directory:

java -jar mal2json.jar path/to/*.mal > output_mal.json

Another example that can be tested within this repository to convert the corelang MAL specification to json could be:

java -jar mal2json.jar tests/coreLang/*.mal > corelang.json