Skip to content

Commit

Permalink
Add the JSON language to the import and exporter section
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderpann committed Jun 10, 2024
1 parent 8bb4a89 commit 77a6978
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
29 changes: 29 additions & 0 deletions src/doc/docs/platform_essentials/mpsutils/importer_and_exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,32 @@ This plugin adds two actions for importing XML files into MPS:
- *Import XML File(s)*: This action parses on or multiple XML files and creates XML root nodes for them in the
selected model.

## JSON

> ^^com.mbeddr.mpsutil.json^^
This language implements a simple JSON language you can use as a generator target. The [JSON file](http://127.0.0.1:63320/node?ref=r%3Abe665d13-1e1d-44cd-9817-8bd4d610f422%28com.mbeddr.mpsutil.json.structure%29%2F4342692121161094115) root node supports an additional package name used as the folder inside the generation folder.

An example of a file that you can generate:

```json
{
"description" : "This is a JSON file",
"name" : "my JSON file",
"this is an object" : {
"And another object" : {
"With a description" : "object description",
"An array" : [
"valu1",
"value2"
],
"withANumber" : 1.232E+231231,
"empty array" : [ ],
"empty object" : { },
"empty string" : ""
}
}
}
```

An importer also exists for the language. It can import all JSON files in a folder or just single files.
34 changes: 0 additions & 34 deletions src/doc/docs/platform_essentials/mpsutils/languages.md

This file was deleted.

1 change: 0 additions & 1 deletion src/doc/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ nav:
- Base Language Extensions: platform_essentials/mpsutils/baselanguage_extensions.md
- Generator: platform_essentials/mpsutils/generator.md
- Importer and Exporter: platform_essentials/mpsutils/importer_and_exporter.md
- Languages: platform_essentials/mpsutils/languages.md
- Language Extensions: platform_essentials/mpsutils/language_extensions.md
- Tools: platform_essentials/mpsutils/tools.md
- UI: platform_essentials/mpsutils/ui.md
Expand Down

0 comments on commit 77a6978

Please sign in to comment.