Serialiser_Engine: Handle the case of a class containing another class that was only changed internally #1301
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: Depends on
BHoM/Versioning_Toolkit#6
See BHoM/Versioning_Toolkit#6 for more details
Additional comments
When a class is modified only internally, there is no
Deprecated
tag used anywhere (since the class is still active, just modified). This makes it very difficult to detect when deserialising another class that has this modified class as one of the inner properties. The only solution I could find here is to deserialise as custom object so the text now only contains upgraded json/bson and then deserialise again. This works fine and doesn't break the case of deleted classes. Make sure you test any case you can think of though as this is probably the part that is most likely to fail in some weird cases.