-
Notifications
You must be signed in to change notification settings - Fork 413
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
Refactor JSON serialisation #1787
base: master
Are you sure you want to change the base?
Conversation
Looking very clean! |
I always wondered that too. |
By the way, at the moment, the GrampsType values are still dependent on the locale, as we are not using |
Yes. I've already changed |
I've just tried making |
Renamed |
Simplify the JSON serialisation by creating methods to get and set the state of an object.
The method names
get_attrs
andset_attrs
are not ideal and will probably need changing.There is some copy and paste of these methods from the
BaseObject
into theDate
object. Why areGrampsType
,Date
,StyledText
andStyledTextTag
not derived fromBaseObject
?TODO: Look at removing the checks for empty dates from the
to_json
andfrom_json
functions.