JSONConfig has no delete method
JSONConfig in utils/config.py allows set/get but not delete of a specific key. Is it possible to delete a key from a plugin's json file?
Normally I don't need this, but I'm renaming a key and the only way I found to 'remove' the old key is to set the old key value to Null.
This is sufficient, although it leaves old/unused data in the file, and it means an extra test is needed since the key exists but the data is Null (since get(store_name, DEFAULTS) will not set the key to DEFAULTS if the key exists but is a dict with Null).
|