Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable writing to JSON without including BHoM-specific attributes #133

Open
tg359 opened this issue May 5, 2022 · 1 comment
Open

Enable writing to JSON without including BHoM-specific attributes #133

tg359 opened this issue May 5, 2022 · 1 comment
Assignees
Labels
type:feature New capability or enhancement

Comments

@tg359
Copy link

tg359 commented May 5, 2022

Description:

When handling JSON files unrelated to BHoM (such as config files for external programs), it would be nice to be able to handle these files and re-save them without including any BHoM attributes (guids, etc) that we get when serialising from a customObject to a JSON file.

@tg359 tg359 added the type:feature New capability or enhancement label May 5, 2022
@alelom
Copy link
Member

alelom commented May 5, 2022

Sorry, I realized this can't work - we need to change how the UI behaves when it sees a deserialized object that is unknown (not bhom).
That's why we are now "wrapping" in a CustomObject, so that then the Explode can explode it. The annoying part is that the CustomObject is a BHoMObject, instead of an IObject, and this is driven by the fact that we are storing the properties in the CustomData dictionary. It means we need to go and change base bhom serializer and ui, can't be done from the File_Toolkit directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants