Exporting facts to a file will only save the transient flag for those flags (if set of course) and any other flags are ignored.
This is because of this line in the ExportFacts function
F->flags &= -1 & FACTTRANSIENT; // dont pass transient flag out
The comment doesn’t match the actual functionality which keeps only the FACTTRANSIENT bit.
I can see and understand the need to remove the system defined flags and the JSON flags would lose their meaning over an export/import. But ^import has a transient parameter to reset the FACTTRANSIENT bit for each fact, so I’m not sure what is gained by this tweaking of the flags on the export.
However, I came across this because I was hoping to have some user flags survive over the export/import. Are those something that should be saved?