Closed jw3 closed 11 months ago
We originally used a dict because of the supported translation to/fro json. Can we embed the strings into a dict so that we can maintain the json session file format? *-ish? Maybe that's a higher level dict now comprised of two sub-dicts? In any event, I'd like to maintain the json file format if possible.
Test
The trust record is serialized as a dict, the rule and config as strings.
The application is attempting to use nested exception handling to derive the flavor of string being deserialized from the session file.
https://github.com/ctc-oss/fapolicy-analyzer/blob/master/fapolicy_analyzer/ui/changeset_wrapper.py#L35-L59
The root deficiency here lies in the format of the session file. A new format that includes a type discriminator should be defined. At that time the deserialize function can be rewritten to match.