This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

This page is used to discuss the merging of esodan's Serialization work into GXml.

This has been a challenge, because my original intent has been to have an API that mimicks json-glib's Serialization framework. However this wasn't communicated well so esodan's XML Object Model-based serialization diverges quite a bit. Here I'll note differences and plans for it.

Some principles to guide choices * minimal work for user; want as much serialization automated as possible * minimal interface; interface can be extended in a subinterface * compatibility with json-glib * minimal unnecessary features in core Serialization

configure.ac: version changes

/ change version to 0.4 / add copyright for esodan * update dependencies (make sure those are shipped in distros) * change gxml.pc to gxml-0.4.pc (why? parallel installs?)

Attr.vala

x adds copy method (convenience method replacing 2 lines with 1? nah)

Serialization overview

* consider moving Serialization implementations into subdirs

Serializable.vala: the interface

* serialize: new: consider adding .serialize (), so you can handle serialization above the level of properties (why?)

* serialize_property:

* default implementations:

* find_property, list_properties, get_property, set_property: distinguish from GObject and GObjectClass names

Serialization

* private "generic" functions, abstracting Serializable versus non-Serializable calls

  1. affects serialize_property (), serialize_object ()

* serialize_property:

  1. change 3rd parametre from GXmlDocument to GXmlNode, change the return type to true/false, append straight to parametre node

* serialize_object:

  1. adapt to changes from using generic functions, changes to Serializable's interface

* deserialize_property:

  1. simplify error handling (leave it up to string_to_gvalue?)

* clear_caches:

  1. renamed from clear_cache

* deserialize_object:

  1. adapt to use generics

* string_to_gvalue

  1. improve error message

2024-10-23 11:08