-
Notifications
You must be signed in to change notification settings - Fork 39
Description
The current version of the API requires explicitly providing information about the target parser and source (in the SessionSetup object).
However, there is a need for a simplified API intended for text files.
Possible implementation approaches
Adapting SessionSetup
Since, under the components model paradigm, the client has no knowledge of the available parsers and sources, one option is to modify the SessionSetup object so that the parser and source fields become optional.
If the client does not specify a target parser and source, rustcore would interpret this as a command to treat the file as a plain text file.
Introducing a "known" parser and source
Another approach is to define a specific UUID for a parser and source pair dedicated to processing text files.
On the client side, this UUID could be hardcoded (which is not recommended), or a dedicated API could be introduced to return the UUIDs for the text parser and source, allowing the client to retrieve and reuse them as needed.
The first option (adapting the SessionSetup object) appears to be the most appropriate.
However, this would require rustcore to define behavior for cases where the provided file is not a text file - which would likely result in an error.