mal2json is a tool that can be used to convert MAL specifications into easily manipulable JSON files.
This project requires at least Java 10.
mvn package
cp target/mal2json-1.0.0-jar-with-dependencies.jar mal2json.jar
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