AixLib.Utilities.IO.Files.JSONWriter

# .AixLib.Utilities.IO.Files.JSONWriter

Model for writing results to a json file

## Information

This model samples the model inputs `u` and saves them to a json file.

#### Typical use and important parameters

The parameter `nin` defines the number of variables that are stored. In Dymola, this parameter is updated automatically when inputs are connected to the component.

The parameter `fileName` defines to what file name the results are saved. The file is in the current working directory, unless an absolute path is provided.

The parameter `keyNames` defines the key names that are used to store the json values corresponding to the inputs `u`.

#### Dynamics

This model samples its inputs at the time defined by the parameter `outputTime` and writes them to the file `fileName`. The model has the following options:

- If `outputTime==OutputTime.Initial`, results are saved at initialisation.
- If `outputTime==OutputTime.Custom`, results are saved when the built-in variable `time` achieves `customTime`.
- If `outputTime==OutputTime.Terminal`, results are saved when the simulation terminates.

## Revisions

- April 9, 2019 by Filip Jorissen:
  First implementation. See #1114.

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos