trivet 3.1.0

The trivet Parser Library
Documentation
# Appendix: JSON Parser Validation

The JSON parser in **Trivet** is validated using the [JSONTestSuite](https://github.com/nst/JSONTestSuite). This appendix describes how to replicate (or update) that validation.

Clone the test suite.

```bash
git clone https://github.com/nst/JSONTestSuite.git
```

Next we need to add the **Trivet** JSON validator and also the example parser created in [JSON Example](example_json.md) to the test set. Build the examples and copy the `json_validator` and `book_json_parser` executables to the test suite folder.

```bash
cargo build --release --examples
cp target/release/examples/json_validator JSONTestSuite/parsers/.
cp target/release/examples/book_json_parser JSONTestSuite/parsers/.
```

Now you need to add the parser to the configuration. Edit `JSONTestSuite/run_tests.py` and add the following entry to the `programs` map.

```json
    "Trivet JSON Validator":
        {
            "url":"",
            "commands":[os.path.join(PARSERS_DIR, "json_validator")]
        },
    "Trivet Book Example":
        {
            "url":"",
            "commands":[os.path.join(PARSERS_DIR, "book_json_parser")],
            "use_stdin":True
        },
```

Now you can generate all results with `./run_tests.py`.

If you only want to see results for **Trivet**, add the following `trivet_only.json` file to the `JSONTestSuite` folder.

```json
["Trivet JSON Validator", "Trivet Book Example"]
```

Now run `run_tests.py --filter trivet_only.json`.