Kratos
Kratos copied to clipboard
Include another file in json files
There are several cases that we need (or it would be better) to include another json file in our project parameters and materials.
@KratosMultiphysics/technical-committee we arrived to the conclusion to use define keywords of inclusion:
- @include_json
- @include_csv
- @include_grf
or similar ones for other formats.
The implementation should be done in a new Jsonfstream which substitutes the included files and give back the complete string to the actual Parameters class.
The implementation could be done in different ways
- As a list of elements "@include_json" : ["file_name1.json", file_name2.json"]
- Unique element "@include_json" : "file_name.json"
This case is more simple but does not allow to include more than one json file (due to "duplicate key")
I would go for the unique one until we find a use case for the list. @KratosMultiphysics/technical-committee and @KratosMultiphysics/implementation-committee what you think?
I would go for the unique one until we find a use case for the list. @KratosMultiphysics/technical-committee and @KratosMultiphysics/implementation-committee what you think?
Agree. Besides, taking into account how we write information in our GUIs, I've the feeling that we'll never need concatenating a list of json files.
Closing, this is implemented in #10004