speedb icon indicating copy to clipboard operation
speedb copied to clipboard

Mechanism for saving and reading Options in other string formats (like JSON or XML)

Open mrambacher opened this issue 2 years ago • 4 comments

Currently, Options are stored in a file in something similar to a Properties file format, where there is a label and the name=value pairs on separate lines. Sets of options can also be passed to the ConfigureFromString method (";" separated name-value pairs) and converted to strings (delimiter separated name-value pairs).

This issue requests that we support other formats, such as JSON or XML. These other formats may be more widely known and could be easier to generate from or consumed by external tools.

For the Configure piece, this is mostly writing a different implementation of StringToMap. There is likely another method needed on the Serialize side (to store values in a map that can be converted to a string, rather than as a string directly).

Note that RocksDB users such as topling db have something similar, but it is more of an "add-on" rather than "integrated" functionality.

mrambacher avatar Jan 26 '23 21:01 mrambacher

@mrambacher - is this connected to a specific PR ? Please consolidate or add a PR

Guyme avatar Oct 30 '23 09:10 Guyme

@Guyme There is no ability at this point to write an options file to JSON or XML format. The code to support writing Options to different formats is part of #692 and #719, but there is no work currently to support XML or JSON and the format of the Options file is not changed.

mrambacher avatar Oct 30 '23 11:10 mrambacher

@mrambacher - Is this pr required for #430 ?

udi-speedb avatar Oct 30 '23 15:10 udi-speedb

N

@mrambacher - Is this pr required for #430 ?

No, #719 is required for #430, but other formats like JSON and XML are not required. And there is the possibility that #719 is not in itself adequate to address this issue (though it is a good start).

mrambacher avatar Oct 30 '23 19:10 mrambacher